-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (32 loc) · 1.08 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
31
32
33
34
35
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