Skip to content

v0.6.0

v0.6.0 #6

Workflow file for this run

name: Release
on:
release:
types: [published]
permissions:
contents: write
packages: write
env:
CONFIGURATION: Release
DOTNET_NOLOGO: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get version from tag
id: tag_name
run: echo "current_version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Check out repository
uses: actions/[email protected]
- name: Set up .NET
uses: xt0rted/[email protected]
- run: dotnet tool restore
- run: dotnet r build
- run: dotnet r test -- --no-build --logger GitHubActions
- run: dotnet r pack -- --no-build
- name: Publish artifacts
uses: actions/[email protected]
with:
path: ./artifacts/*.nupkg
- name: Get changelog entry
uses: mindsers/[email protected]
id: changelog_reader
with:
version: ${{ steps.tag_name.outputs.current_version }}
- name: Upload release assets
uses: softprops/[email protected]
id: release_updater
with:
body: ${{ steps.changelog_reader.outputs.changes }}
files: ./artifacts/*.nupkg
- name: Create discussion for release
run: |
gh api \
--method PATCH \
-H "Accept: application/vnd.github+json" \
/repos/${{ github.repository }}/releases/${{ steps.release_updater.outputs.id }} \
-f discussion_category_name='Announcements'
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
- name: Publish to GPR
run: |
dotnet nuget push "./artifacts/*.nupkg" \
--api-key ${{ secrets.GITHUB_TOKEN }} \
--source https://nuget.pkg.github.com/${{ github.repository_owner }}
- name: Publish to nuget.org
run: |
dotnet nuget push "./artifacts/*.nupkg" \
--api-key ${{ secrets.NUGET_TOKEN }} \
--source https://api.nuget.org/v3/index.json