Skip to content

DefaultUnDo 2.0.0

DefaultUnDo 2.0.0 #20

Workflow file for this run

name: release
on:
release:
types: [published]
jobs:
release:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
source-url: https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_API_KEY }}
- name: Decrypte snk file
env:
SNK_KEY: ${{ secrets.SNK_KEY }}
run: gpg --quiet --batch --yes --decrypt --passphrase="$env:SNK_KEY" --output ds.snk ds.snk.gpg
- name: Create packages
run: |
dotnet pack source -c Release -o build /p:Version=${{ github.event.release.tag_name }} /p:SignAssembly=true /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg
- name: Create RELEASE.txt
run: |
type documentation\NEXT_RELEASENOTES.txt | Out-File build\RELEASE.txt
echo "" | Out-File build\RELEASE.txt -Append
echo "[nuget package](https://www.nuget.org/packages/DefaultUnDo/${{ github.event.release.tag_name }})" | Out-File build\RELEASE.txt -Append
- name: Update release
uses: tubone24/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
release_name: DefaultUnDo ${{ github.event.release.tag_name }}
prerelease: ${{ contains(github.event.release.tag_name, '-') }}
body_path: .\build\RELEASE.txt
- name: Clear NEXT_RELEASENOTES.txt
run: echo "" | Out-File documentation\NEXT_RELEASENOTES.txt -NoNewLine
- name: Publish package
run: dotnet nuget push build\*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
- name: Commit RELEASENOTES and documentation api
run: |
git config --local user.email "$(git log --format='%ae' HEAD^!)"
git config --local user.name "$(git log --format='%an' HEAD^!)"
git add .
git commit -m "Updated RELEASENOTES and documentation api"
git push origin HEAD:master