Fix missing using on console app and path to book file. Fixes #15 #8
Workflow file for this run
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
on: | |
push: | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
env: | |
DOTNET_NOLOGO: true | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Verify commit exists in origin/master | |
run: | | |
git fetch --no-tags --prune --depth=1 origin '+refs/heads/*:refs/remotes/origin/*' | |
git branch --remote --contains | grep origin/master | |
- name: Set VERSION variable from tag | |
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV | |
- name: Pack | |
run: | | |
dotnet pack src \ | |
-p:PackageVersion="${VERSION}" \ | |
--configuration Release \ | |
--verbosity normal \ | |
--output . | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: nupkg | |
path: | | |
*.nupkg | |
*.snupkg | |
deploy-nuget: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download Artifact | |
uses: actions/download-artifact@v1 | |
with: | |
name: nupkg | |
- name: Push to NuGet | |
run: | | |
dotnet nuget push ./nupkg/* \ | |
--source ${FEED_URL} \ | |
--api-key ${FEED_KEY} \ | |
--skip-duplicate | |
env: | |
FEED_URL: https://api.nuget.org/v3/index.json | |
FEED_KEY: ${{ secrets.NUGET_KEY }} |