Skip to content

Commit f912e75

Browse files
ci: add workflow_dispatch to release workflow for manual builds (#29)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 82f9195 commit f912e75

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ on:
44
push:
55
branches:
66
- main
7+
workflow_dispatch:
8+
inputs:
9+
tag_name:
10+
description: "Release tag to upload assets to (e.g., v0.1.1)"
11+
required: true
12+
type: string
713

814
env:
915
CARGO_TERM_COLOR: always
@@ -15,6 +21,7 @@ permissions:
1521
jobs:
1622
release-please:
1723
name: Release Please
24+
if: github.event_name == 'push'
1825
runs-on: ubuntu-latest
1926
outputs:
2027
release_created: ${{ steps.release.outputs.release_created }}
@@ -28,7 +35,9 @@ jobs:
2835
build:
2936
name: Build (Linux)
3037
needs: release-please
31-
if: ${{ needs.release-please.outputs.release_created }}
38+
if: >-
39+
always() &&
40+
(needs.release-please.outputs.release_created == 'true' || github.event_name == 'workflow_dispatch')
3241
runs-on: ubuntu-22.04
3342
steps:
3443
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -54,7 +63,8 @@ jobs:
5463
env:
5564
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5665
run: |
57-
gh release upload ${{ needs.release-please.outputs.tag_name }} \
66+
TAG="${{ needs.release-please.outputs.tag_name || github.event.inputs.tag_name }}"
67+
gh release upload "$TAG" \
5868
target/release/ado-aw-linux-x64 \
5969
target/release/checksums.txt \
6070
--clobber

0 commit comments

Comments
 (0)