From 2a7aa2ab5a017fa30362564c49c464baacbf552c Mon Sep 17 00:00:00 2001 From: talynone Date: Mon, 27 Apr 2026 01:57:23 -0700 Subject: [PATCH] Allow manual workflow dispatches for tesitng --- .github/workflows/release.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 86926be..13a71b5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,6 +2,12 @@ on: push: tags: - 'v*.*.*' + workflow_dispatch: + inputs: + tag_name: + description: 'Draft release tag (e.g. v0.4.5-test)' + required: true + default: 'v0.0.0-test' name: 🚀 Release on GitHub jobs: @@ -64,11 +70,11 @@ jobs: run: | if [ -f CHANGELOG.md ]; then # Extract version number from tag - VERSION_NUM=$(echo "${{ github.ref_name }}" | sed -E 's/^v([0-9]+\.[0-9]+\.[0-9]+)(-.*)?$/\1/') + VERSION_NUM=$(echo "${{ inputs.tag_name || github.ref_name }}" | sed -E 's/^v([0-9]+\.[0-9]+\.[0-9]+)(-.*)?$/\1/') # Read and replace placeholders CONTENT=$(cat CHANGELOG.md) - CONTENT=${CONTENT///${{ github.ref_name }}} + CONTENT=${CONTENT///${{ inputs.tag_name || github.ref_name }}} CONTENT=${CONTENT///$VERSION_NUM} echo "content<> $GITHUB_OUTPUT @@ -85,11 +91,11 @@ jobs: run: | if (Test-Path "CHANGELOG.md") { # Extract version number from tag - $version_num = "${{ github.ref_name }}" -replace '^v([0-9]+\.[0-9]+\.[0-9]+)(-.*)?$','$1' + $version_num = "${{ inputs.tag_name || github.ref_name }}" -replace '^v([0-9]+\.[0-9]+\.[0-9]+)(-.*)?$','$1' # Read and replace placeholders $content = Get-Content -Path CHANGELOG.md -Raw - $content = $content -replace '', "${{ github.ref_name }}" + $content = $content -replace '', "${{ inputs.tag_name || github.ref_name }}" $content = $content -replace '', "$version_num" "content<> $env:GITHUB_OUTPUT @@ -106,8 +112,8 @@ jobs: TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} with: - tagName: ${{ github.ref_name }} - releaseName: ${{ github.event.repository.name }}-${{ github.ref_name }} + tagName: ${{ inputs.tag_name || github.ref_name }} + releaseName: ${{ github.event.repository.name }}-${{ inputs.tag_name || github.ref_name }} releaseBody: ${{ (matrix.platform == 'windows-latest' || matrix.platform == 'windows-11-arm') && steps.changelog_windows.outputs.content || steps.changelog_unix.outputs.content }} releaseDraft: true prerelease: false