Skip to content

Release

Release #8

Workflow file for this run

name: Release
on:
create:
branches:
- 'release/*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.x.x' # You can adjust the version if needed
- name: Build
run: |
version=$(echo "${{ github.ref }}" | sed 's/refs\/heads\/release\///')
echo $version
dotnet restore
dotnet build --configuration Release -p:Version=$version
- name: Push
run: |
packages=$(find . -name '*.nupkg')
echo ${{ steps.extract-version.outputs.version }}
for package in $packages; do
dotnet nuget push $package --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY
done
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}