1
+ name : access-token-management\release
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ inputs :
6
+ version :
7
+ type : string
8
+ description : " Version in format X.Y.Z or X.Y.Z-preview.N"
9
+ required : true
10
+ default : ' 0.0.0'
11
+
12
+ env :
13
+ DOTNET_NOLOGO : true
14
+
15
+ defaults :
16
+ run :
17
+ working-directory : access-token-management
18
+ shell : pwsh
19
+
20
+ jobs :
21
+ tag :
22
+ name : Tag and Pack
23
+ runs-on : ubuntu-latest
24
+ permissions :
25
+ contents : write
26
+ packages : write
27
+
28
+ steps :
29
+ - uses : actions/checkout@v4
30
+ with :
31
+ fetch-depth : 0
32
+
33
+ - uses : actions/setup-dotnet@v4
34
+ with :
35
+ dotnet-version : |
36
+ 8.0.x
37
+
38
+ - name : Tag
39
+ run : |
40
+ git config --global user.email "github-bot@duendesoftware.com"
41
+ git config --global user.name "Duende Software GitHub Bot"
42
+ git tag -a atm-${{ github.event.inputs.version }} -m "Release v${{ github.event.inputs.version }}"
43
+ git push origin atm-${{ github.event.inputs.version }}
44
+
45
+ - name : Pack
46
+ run : ./build.ps1 pack
47
+
48
+ - name : Install Sectigo CodeSiging CA certificates
49
+ run : |
50
+ sudo apt-get update
51
+ sudo apt-get install -y ca-certificates
52
+ sudo cp build/SectigoPublicCodeSigningRootCrossAAA.crt /usr/local/share/ca-certificates/
53
+ sudo update-ca-certificates
54
+
55
+ - name : Sign
56
+ env :
57
+ SignClientSecret : ${{ secrets.SignClientSecret }}
58
+ run : ./build.ps1 sign
59
+
60
+ - name : Push packages to MyGet
61
+ run : dotnet nuget push artifacts\*.nupkg -s https://www.myget.org/F/duende_identityserver/api/v2/package -k ${{ secrets.MYGET }}
62
+
63
+ - name : Push packages to GitHub
64
+ run : dotnet nuget push artifacts\*.nupkg --source https://nuget.pkg.github.com/DuendeSoftware/index.json --api-key ${{ secrets.GITHUB_TOKEN }}
65
+ env :
66
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
67
+ NUGET_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
68
+
69
+ - name : Upload artifacts
70
+ uses : actions/upload-artifact@v4
71
+ with :
72
+ path : access-token-management/artifacts/*.nupkg
73
+ compression-level : 0
74
+ overwrite : true
75
+ retention-days : 15
76
+
77
+ publish :
78
+ name : Publish to NuGet
79
+ runs-on : ubuntu-latest
80
+ environment : nuget.org
81
+ needs : tag
82
+
83
+ steps :
84
+ - uses : actions/download-artifact@v4
85
+
86
+ - uses : actions/setup-dotnet@v4
87
+ with :
88
+ dotnet-version : |
89
+ 8.0.x
90
+
91
+ - name : Release
92
+ # run: dotnet nuget push artifacts\*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGETORG_TOKEN }}
93
+ run : Write-Host "Release.."
0 commit comments