Adjust version number to patch rather than minor #16
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: Package release | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
jobs: | |
pack: | |
name: Package and publish | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: 6.0.x | |
source-url: https://nuget.pkg.github.com/UK-SBCoA/index.json | |
env: | |
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set VERSION variable from tag | |
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV | |
- name: Build the projects in solution by building the project that uses them all | |
run: dotnet build src/UDS.Net.API -c Release | |
- name: Pack UDS.Net.API.Client | |
run: dotnet pack src/UDS.Net.API.Client -c Release -o . | |
- name: Pack UDS.Net.Dto | |
run: dotnet pack src/UDS.Net.Dto -c Release -o . | |
- name: Push packages to GitHub | |
run: dotnet nuget push UDS.Net.*.nupkg --skip-duplicate --no-symbols | |
- name: Push packages to Nuget.org | |
run: dotnet nuget push UDS.Net.*.nupkg --source 'https://api.nuget.org/v3/index.json' --api-key ${{ secrets.NUGETORG_API_KEY_UDSNETAPI }} --skip-duplicate --no-symbols |