chore: set alpha.8 version #184
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
name: Build and publish NuGet packages | |
on: | |
push: | |
branches: | |
- feature/dotnet-core | |
pull_request: | |
branches: | |
- feature/dotnet-core | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install .NET Core SDK | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: '6.0.x' # use latest 6.0 SDK | |
env: | |
DOTNET_NOLOGO: true | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
- name: Restore required NuGet packages | |
run: dotnet restore | |
working-directory: src | |
- name: Build | |
run: dotnet build --configuration Release --no-restore -p:BuildNumber=$GITHUB_RUN_NUMBER -p:ContinuousIntegrationBuild=true | |
working-directory: src | |
- name: Create NuGet packages | |
if: github.ref == 'refs/heads/feature/dotnet-core' # only publish on pushes, not on PRs | |
run: dotnet pack --configuration Release --no-build --output ../packages -p:BuildNumber=$GITHUB_RUN_NUMBER -p:ContinuousIntegrationBuild=true | |
working-directory: src | |
- name: Upload NuGet packages as artifacts | |
if: github.ref == 'refs/heads/feature/dotnet-core' # only publish on pushes, not on PRs | |
uses: actions/upload-artifact@v1 | |
with: | |
name: NuGet_Packages | |
path: packages | |
- name: Publish NuGet packages to GitHub package registry | |
if: github.ref == 'refs/heads/feature/dotnet-core' # only publish on pushes, not on PRs | |
run: dotnet nuget push ./packages/**/*.nupkg --skip-duplicate --source $NUGET_SOURCE --api-key $NUGET_API_KEY | |
env: | |
NUGET_SOURCE: https://nuget.pkg.github.com/thinktecture/index.json | |
NUGET_API_KEY: ${{secrets.GITHUB_TOKEN}} |