Upload dotnet package #5
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: Upload dotnet package | |
on: | |
release: | |
types: [created] | |
env: | |
PACKAGE_NAME: Descope | |
RELEASE_VERSION: ${{ github.event.release.tag_name }} | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-dotnet@v4 | |
with: | |
source-url: https://nuget.pkg.github.com/${{github.repository_owner}}/index.json | |
env: | |
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- run: dotnet build --configuration Release ${{ env.PACKAGE_NAME }} | |
- name: Create the package | |
run: dotnet pack --configuration Release ${{ env.PACKAGE_NAME }} | |
- name: Publish the package to GPR | |
run: dotnet nuget push ${{ env.PACKAGE_NAME }}/bin/Release/*.nupkg | |
- uses: actions/setup-dotnet@v4 | |
with: | |
source-url: https://api.nuget.org/v3/index.json | |
env: | |
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_ORG_KEY }} | |
- name: Publish the package to NuGet.org | |
run: dotnet nuget push ${{ env.PACKAGE_NAME }}/bin/Release/*.nupkg |