-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
22 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,16 @@ | ||
name: Build Package | ||
|
||
name: Build | ||
on: | ||
pull_request: | ||
branches: "*" | ||
workflow_dispatch: | ||
jobs: | ||
build: | ||
|
||
runs-on: windows-latest | ||
|
||
steps: | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v2 | ||
with: | ||
dotnet-version: 6.0.x | ||
|
||
- name: Build project | ||
run: dotnet build src\jcdcdev.Umbraco.Core\jcdcdev.Umbraco.Core.csproj --configuration Release | ||
permissions: | ||
contents: write | ||
uses: jcdcdev/jcdcdev.Github.UmbracoSimpleDeploy/.github/workflows/build-release-template.yml@main | ||
with: | ||
project-name: 'jcdcdev.Umbraco.Core' | ||
project-path: './src/jcdcdev.Umbraco.Core/jcdcdev.Umbraco.Core.csproj' | ||
deploy: false | ||
secrets: | ||
nuget-api-key: ${{ secrets.NUGET_API_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,17 @@ | ||
name: Release Package | ||
run-name: > | ||
push NuGet ${{ github.repository}} #${{ github.run_number }} | ||
name: Release | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
types: [closed] | ||
branches: [ "main" ] | ||
types: [ closed ] | ||
workflow_dispatch: | ||
jobs: | ||
determine-version: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
semVer: ${{ steps.gitversion.outputs.semVer }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install GitVersion | ||
uses: gittools/actions/gitversion/setup@v0 | ||
with: | ||
versionSpec: '5.x' | ||
- name: Determine Version | ||
id: gitversion # id to later be referenced | ||
uses: gittools/actions/gitversion/execute@v0 | ||
build: | ||
name: push ${{ needs.determine-version.outputs.semVer }} | ||
runs-on: windows-latest | ||
needs: determine-version | ||
env: | ||
SEMVER: ${{ needs.determine-version.outputs.semVer }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v2 | ||
with: | ||
dotnet-version: 6.0.x | ||
- name: Build project | ||
run: dotnet build src\jcdcdev.Umbraco.Core\jcdcdev.Umbraco.Core.csproj --configuration Release -p:Version=${{ env.SEMVER }} | ||
|
||
- name: Pack | ||
run: dotnet pack src\jcdcdev.Umbraco.Core\jcdcdev.Umbraco.Core.csproj --configuration Release -p:Version=${{ env.SEMVER }} --no-build --output . | ||
|
||
- name: Push to NuGet | ||
run: dotnet nuget push **\*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json | ||
post-deploy: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- determine-version | ||
- build | ||
env: | ||
SEMVER: ${{ needs.determine-version.outputs.semVer }} | ||
name: post-deploy ${{ needs.determine-version.outputs.semVer }} | ||
build_release: | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Tag commit | ||
env: | ||
TAG: ${{ env.SEMVER }} | ||
MESSAGE: "" | ||
run: | | ||
git config user.name "${GITHUB_ACTOR}" | ||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
git tag -a "${TAG}" -m "${MESSAGE}" | ||
git push origin "${TAG}" | ||
uses: jcdcdev/jcdcdev.Github.UmbracoSimpleDeploy/.github/workflows/build-release-template.yml@main | ||
with: | ||
project-name: 'jcdcdev.Umbraco.Core' | ||
project-path: './src/jcdcdev.Umbraco.Core/jcdcdev.Umbraco.Core.csproj' | ||
deploy: true | ||
secrets: | ||
nuget-api-key: ${{ secrets.NUGET_API_KEY }} |