Skip to content

Fixes #28, verify bootloader message #10

Fixes #28, verify bootloader message

Fixes #28, verify bootloader message #10

Workflow file for this run

name: Publish to NuGet & GitHub Releases
on:
push:
tags:
- "v*" # Triggers when a tag like v2.0.2 is pushed
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.0.x"
- name: Restore dependencies
run: dotnet restore
- name: Get version from Git tag
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Build the project
run: dotnet build --configuration Release --no-restore /p:Version=${{ env.VERSION }}
- name: Pack NuGet package
run: dotnet pack --configuration Release --no-build --output nupkg /p:PackageVersion=${{ env.VERSION }}
- name: Push to NuGet
run: dotnet nuget push nupkg/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ env.VERSION }}
name: Release v${{ env.VERSION }}
body: |
**What's new in v${{ env.VERSION }}**
- Automatic release via GitHub Actions.
- View commit history for more details.
files: nupkg/*.nupkg
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}