-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from NikRimington/amend/workflow-update
Amend/workflow update
- Loading branch information
Showing
3 changed files
with
99 additions
and
39 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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Build and Release Package | ||
|
||
# This action will start when a correctly formatted tag is pushed (e.g. v0.1.0) | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v[0-9]+.[0-9]+.[0-9]+" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
|
||
- name: Set Version Variable | ||
if: ${{ github.ref_type == 'tag' }} | ||
env: | ||
TAG: ${{ github.ref_name }} | ||
run: echo "VERSION=${TAG#v}" >> $GITHUB_ENV | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup .NET 6 | ||
uses: actions/setup-dotnet@v2 | ||
with: | ||
dotnet-version: 6.0.x | ||
|
||
- name: Setup .NET 7 | ||
uses: actions/setup-dotnet@v2 | ||
with: | ||
dotnet-version: 7.0.x | ||
|
||
- name: Setup .NET 8 | ||
uses: actions/setup-dotnet@v2 | ||
with: | ||
dotnet-version: 8.0.x | ||
|
||
- name: Build project | ||
run: dotnet build src\HC.PageNotFoundManager\HC.PageNotFoundManager.csproj --configuration Release /p:Version=$VERSION | ||
|
||
- name: Pack project | ||
run: dotnet pack --output nupkgs /p:PackageVersion=$VERSION .\src\PageNotFoundManager.sln | ||
|
||
- name: upload nuget package | ||
if: github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/v') | ||
run: dotnet nuget push **\*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json |
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Build and Release Package | ||
|
||
on: | ||
push: | ||
branches: ["develop"] | ||
pull_request: | ||
branches: ["develop"] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get next version | ||
uses: reecetech/version-increment@2023.9.3 | ||
id: version | ||
with: | ||
scheme: semver | ||
increment: patch | ||
release_branch: main | ||
|
||
- name: Set Version Variable | ||
env: | ||
TAG: ${{ steps.version.outputs.version }} | ||
run: echo "VERSION=${TAG#v}" >> $GITHUB_ENV | ||
|
||
- name: Setup .NET 6 | ||
uses: actions/setup-dotnet@v2 | ||
with: | ||
dotnet-version: 6.0.x | ||
|
||
- name: Setup .NET 7 | ||
uses: actions/setup-dotnet@v2 | ||
with: | ||
dotnet-version: 7.0.x | ||
|
||
- name: Setup .NET 8 | ||
uses: actions/setup-dotnet@v2 | ||
with: | ||
dotnet-version: 8.0.x | ||
|
||
- name: Build project | ||
run: dotnet build src\HC.PageNotFoundManager\HC.PageNotFoundManager.csproj --configuration Release /p:Version=$VERSION | ||
|
||
- name: Pack project | ||
run: dotnet pack --output nupkgs /p:PackageVersion=$VERSION .\src\PageNotFoundManager.sln |
This file was deleted.
Oops, something went wrong.