Skip to content

Release v0.1.0.28

Release v0.1.0.28 #19

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
tag:
description: "Existing tag to release, for example v0.1.0.2"
required: true
type: string
permissions:
contents: write
jobs:
release:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref_name }}
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- name: Install Inno Setup
shell: pwsh
run: choco install innosetup --no-progress -y
- name: Resolve version
shell: pwsh
run: |
$tag = "${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref_name }}"
if ($tag -notmatch '^v\d+\.\d+\.\d+\.\d+$') {
throw "Tag must look like v0.1.0.2"
}
"TAG=$tag" >> $env:GITHUB_ENV
"VERSION=$($tag.Substring(1))" >> $env:GITHUB_ENV
- name: Build artifact
shell: pwsh
env:
FASTTASKMGR_UPDATE_SIGNING_PRIVATE_KEY_PEM: ${{ secrets.FASTTASKMGR_UPDATE_SIGNING_PRIVATE_KEY_PEM }}
run: .\build.ps1 -Version $env:VERSION -NoIncrement
- name: Create or update GitHub release
shell: pwsh
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release view $env:TAG *> $null
if ($LASTEXITCODE -eq 0) {
gh release upload $env:TAG artifacts\FastTaskMgr.exe artifacts\FastTaskMgr.exe.sha256 artifacts\FastTaskMgr-Setup.exe artifacts\FastTaskMgr-Setup.exe.sha256 artifacts\FastTaskMgr-Setup.exe.manifest.json artifacts\FastTaskMgr-Setup.exe.manifest.sig --clobber
}
else {
gh release create $env:TAG artifacts\FastTaskMgr.exe artifacts\FastTaskMgr.exe.sha256 artifacts\FastTaskMgr-Setup.exe artifacts\FastTaskMgr-Setup.exe.sha256 artifacts\FastTaskMgr-Setup.exe.manifest.json artifacts\FastTaskMgr-Setup.exe.manifest.sig --verify-tag --title $env:TAG --notes "FastTaskMgr $env:TAG"
}