-
Notifications
You must be signed in to change notification settings - Fork 1
30 lines (27 loc) · 1.06 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/setup-dotnet@3951f0dfe7a07e2313ec93c75700083e2005cbab # 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
- name: Publish the package to NuGet.org
run: dotnet nuget push -k ${{ secrets.NUGET_ORG_KEY }} -s https://api.nuget.org/v3/index.json ${{ env.PACKAGE_NAME }}/bin/Release/*.nupkg