Workflow run on dispatch

This commit is contained in:
2026-04-08 02:07:21 +02:00
parent 0638737562
commit f2f44bcc3d
+21 -2
View File
@@ -4,6 +4,11 @@ on:
release: release:
types: [published] types: [published]
workflow_dispatch: workflow_dispatch:
inputs:
tag:
description: "Release tag to upload to (e.g. v0.1.4)"
required: false
type: string
jobs: jobs:
build: build:
@@ -57,11 +62,25 @@ jobs:
ditto -c -k --keepParent "$APP_PATH" "$APP_NAME-macos.zip" ditto -c -k --keepParent "$APP_PATH" "$APP_NAME-macos.zip"
# --- Determine tag ---
- name: Get release tag
id: get_tag
run: |
if [ "${{ github.event_name }}" = "release" ]; then
echo "tag=${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
elif [ -n "${{ inputs.tag }}" ]; then
echo "tag=${{ inputs.tag }}" >> $GITHUB_OUTPUT
else
# fallback: latest tag
TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "tag=$TAG" >> $GITHUB_OUTPUT
fi
# --- Upload to release ---
- name: Upload to GitHub Release - name: Upload to GitHub Release
if: github.event_name == 'release'
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2
with: with:
tag_name: ${{ github.event.release.tag_name }} tag_name: ${{ steps.get_tag.outputs.tag }}
files: | files: |
src-tauri/target/release/bundle/**/*.AppImage src-tauri/target/release/bundle/**/*.AppImage
src-tauri/target/release/bundle/**/*.dmg src-tauri/target/release/bundle/**/*.dmg