-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trigger release when making GitHub release
Figure out version number automatically from release tag.
- Loading branch information
Showing
4 changed files
with
41 additions
and
9 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,38 @@ | ||
name: Corral Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
env: | ||
SOLUTION: source/Corral.sln | ||
|
||
jobs: | ||
job0: | ||
name: Corral Release | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Setup dotnet | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: '5.0.x' | ||
- name: Checkout Corral | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Build Corral, package Corral | ||
run: | | ||
# Find version from tag info | ||
VERSION="${GITHUB_REF##*/v}" | ||
echo VERSION=$VERSION | ||
# Change directory to Corral root folder | ||
cd $GITHUB_WORKSPACE | ||
# Restore dotnet tools | ||
dotnet tool restore | ||
# Build Corral | ||
dotnet build -c Release ${SOLUTION} | ||
# Create packages | ||
dotnet pack -p:PackageVersion=$VERSION --no-build -c Release ${SOLUTION} | ||
- name: Deploy to nuget | ||
run: | ||
dotnet nuget push "source/Corral/bin/Release/Corral*.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
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
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