ci: support upload_tag input on workflow_dispatch

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-04-24 02:12:22 +03:00
commit 135fef54c5

View file

@ -4,6 +4,10 @@ on:
release: release:
types: [published] types: [published]
workflow_dispatch: workflow_dispatch:
inputs:
upload_tag:
description: 'Release tag to upload assets to (e.g. v0.1.6)'
required: false
jobs: jobs:
build-flatpak: build-flatpak:
@ -104,11 +108,12 @@ jobs:
mv H7CAD*.AppImage H7CAD.AppImage mv H7CAD*.AppImage H7CAD.AppImage
- name: Upload AppImage to release - name: Upload AppImage to release
if: github.event_name == 'release' if: github.event_name == 'release' || inputs.upload_tag != ''
env: env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
gh release upload ${{ github.ref_name }} H7CAD.AppImage --clobber --repo ${{ github.repository }} TAG=${{ github.event_name == 'release' && github.ref_name || inputs.upload_tag }}
gh release upload $TAG H7CAD.AppImage --clobber --repo ${{ github.repository }}
build-windows: build-windows:
runs-on: windows-latest runs-on: windows-latest