Skip to content

Release: prepare v1.3.0 #144

Release: prepare v1.3.0

Release: prepare v1.3.0 #144

Workflow file for this run

# This file is auto-generated.
name: Release
on:
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- main
schedule:
- cron: 0 0 * * 6
workflow_dispatch:
jobs:
nuget:
permissions:
contents: write
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- id: version
name: Get version
shell: pwsh
run: echo "version=$(scripts/Get-Version.ps1 -RefName $env:GITHUB_REF)" >> $env:GITHUB_OUTPUT
- run: dotnet pack --configuration Release -p:Version=${{ steps.version.outputs.version }}
- name: Read changelog
uses: ForNeVeR/ChangelogAutomation.action@v1
with:
output: ./release-notes.md
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
path: |-
./release-notes.md
./TruePath/bin/Release/TruePath.${{ steps.version.outputs.version }}.nupkg
./TruePath/bin/Release/TruePath.${{ steps.version.outputs.version }}.snupkg
- if: startsWith(github.ref, 'refs/tags/v')
name: Create a release
uses: softprops/action-gh-release@v2
with:
body_path: ./release-notes.md
files: |-
./TruePath/bin/Release/TruePath.${{ steps.version.outputs.version }}.nupkg
./TruePath/bin/Release/TruePath.${{ steps.version.outputs.version }}.snupkg
name: TruePath v${{ steps.version.outputs.version }}
- if: startsWith(github.ref, 'refs/tags/v')
name: Push artifact to NuGet
run: dotnet nuget push ./TruePath/bin/Release/TruePath.${{ steps.version.outputs.version }}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_TOKEN }}