From 9ac062ad7e18c524979c33cd3b2583905d825d5d Mon Sep 17 00:00:00 2001 From: "DESKTOP-RTLN3BA\\$punk" Date: Tue, 7 Apr 2026 15:03:33 -0700 Subject: [PATCH] ci: add workflow_dispatch to desktop release for manual testing --- .github/workflows/desktop-release.yml | 28 ++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/.github/workflows/desktop-release.yml b/.github/workflows/desktop-release.yml index 62ba5d445..1f7e06a0c 100644 --- a/.github/workflows/desktop-release.yml +++ b/.github/workflows/desktop-release.yml @@ -5,6 +5,20 @@ on: tags: - 'v*' - 'beta-v*' + workflow_dispatch: + inputs: + version: + description: 'Version number (e.g. 0.0.15) — used for dry-run testing without a tag' + required: true + default: '0.0.0-test' + publish: + description: 'Publish to GitHub Releases' + required: true + type: choice + options: + - never + - always + default: 'never' permissions: contents: write @@ -27,13 +41,17 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Extract version from tag + - name: Extract version id: version shell: bash run: | - TAG=${GITHUB_REF#refs/tags/} - VERSION=${TAG#beta-} - VERSION=${VERSION#v} + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + VERSION="${{ inputs.version }}" + else + TAG=${GITHUB_REF#refs/tags/} + VERSION=${TAG#beta-} + VERSION=${VERSION#v} + fi echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT" - name: Setup pnpm @@ -75,7 +93,7 @@ jobs: POSTHOG_HOST: ${{ vars.POSTHOG_HOST }} - name: Package & Publish - run: pnpm exec electron-builder ${{ matrix.platform }} --config electron-builder.yml --publish always -c.extraMetadata.version=${{ steps.version.outputs.VERSION }} + run: pnpm exec electron-builder ${{ matrix.platform }} --config electron-builder.yml --publish ${{ inputs.publish || 'always' }} -c.extraMetadata.version=${{ steps.version.outputs.VERSION }} working-directory: surfsense_desktop env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}