-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
93 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
name: access-token-management\release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
type: string | ||
description: "Version in format X.Y.Z or X.Y.Z-preview.N" | ||
required: true | ||
default: '0.0.0' | ||
|
||
env: | ||
DOTNET_NOLOGO: true | ||
|
||
defaults: | ||
run: | ||
working-directory: access-token-management | ||
shell: pwsh | ||
|
||
jobs: | ||
tag: | ||
name: Tag and Pack | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
packages: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: | | ||
8.0.x | ||
- name: Tag | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Duende Software GitHub Bot" | ||
git tag -a atm-${{ github.event.inputs.version }} -m "Release v${{ github.event.inputs.version }}" | ||
git push origin atm-${{ github.event.inputs.version }} | ||
- name: Pack | ||
run: ./build.ps1 pack | ||
|
||
- name: Install Sectigo CodeSiging CA certificates | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y ca-certificates | ||
sudo cp build/SectigoPublicCodeSigningRootCrossAAA.crt /usr/local/share/ca-certificates/ | ||
sudo update-ca-certificates | ||
- name: Sign | ||
env: | ||
SignClientSecret: ${{ secrets.SignClientSecret }} | ||
run: ./build.ps1 sign | ||
|
||
- name: Push packages to MyGet | ||
run: dotnet nuget push artifacts\*.nupkg -s https://www.myget.org/F/duende_identityserver/api/v2/package -k ${{ secrets.MYGET }} | ||
|
||
- name: Push packages to GitHub | ||
run: dotnet nuget push artifacts\*.nupkg --source https://nuget.pkg.github.com/DuendeSoftware/index.json --api-key ${{ secrets.GITHUB_TOKEN }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
path: access-token-management/artifacts/*.nupkg | ||
compression-level: 0 | ||
overwrite: true | ||
retention-days: 15 | ||
|
||
publish: | ||
name: Publish to NuGet | ||
runs-on: ubuntu-latest | ||
environment: nuget.org | ||
needs: tag | ||
|
||
steps: | ||
- uses: actions/download-artifact@v4 | ||
|
||
- uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: | | ||
8.0.x | ||
- name: Release | ||
#run: dotnet nuget push artifacts\*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGETORG_TOKEN }} | ||
run: Write-Host "Release.." |