chore: Add action to release package #4
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: Upload dotnet package | |
on: | |
release: | |
types: [created] | |
push: | |
branches: [ "main" ] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '6.0.x' # SDK Version to use. | |
source-url: https://nuget.pkg.github.com/LuukLabs/index.json | |
env: | |
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- run: dotnet build --configuration Release BKRCalculator | |
- name: Create the package | |
run: dotnet pack --configuration Release BKRCalculator | |
- name: Publish the package to GPR | |
run: dotnet nuget push BKRCalculator/bin/Release/*.nupkg |