Skip to content

Add github workfows (#24) #1

Add github workfows (#24)

Add github workfows (#24) #1

Workflow file for this run

name: release
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Set RELEASE_VERSION
run: echo "RELEASE_VERSION=${GITHUB_REF:11}" >> $GITHUB_ENV #GITHUB_REF:11 skips first 11 characters of GITHUB_REF (GITHUB_REF will look like 'refs/tags/v*.*.*')
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.*
- name: Pack
run: dotnet pack --output ./artifacts --configuration Release -p:GeneratePackageOnBuild=false -p:ContinuousIntegrationBuild=true -p:Version=$RELEASE_VERSION
- name: Publish packages
run: dotnet nuget push ./artifacts/**.nupkg --source nuget.org --api-key ${{secrets.NUGET_TOKEN}}