-
Notifications
You must be signed in to change notification settings - Fork 4
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
1 parent
fbd4673
commit 9618c4e
Showing
2 changed files
with
46 additions
and
2 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,44 @@ | ||
name: Build and Publish NuGet on Tag | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build-and-publish: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: '8.0.*' | ||
|
||
- name: Restore dependencies | ||
run: dotnet restore | ||
|
||
- name: Build | ||
run: dotnet build --configuration Release --no-restore | ||
|
||
- name: Pack | ||
run: dotnet pack --configuration Release --no-build -o nupkgs | ||
|
||
- name: Determine Pre-release Status | ||
id: prerelease | ||
run: | | ||
if [[ ${{ github.ref }} == *"alpha"* ]]; then | ||
echo "##[set-output name=status;]true" | ||
else | ||
echo "##[set-output name=status;]false" | ||
fi | ||
- name: Publish to GitHub Releases | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: nupkgs/*.nupkg | ||
prerelease: ${{ steps.prerelease.outputs.status }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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