Skip to content

Commit ca96e32

Browse files
committed
fix(release): add manual publish trigger for specific tags
1 parent 912f496 commit ca96e32

1 file changed

Lines changed: 39 additions & 1 deletion

File tree

.github/workflows/release.yaml

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,15 @@ on:
66
- main
77
- stable
88
workflow_dispatch:
9+
inputs:
10+
tag:
11+
description: 'Tag to publish (e.g., v0.2.1). Leave empty for normal release-please flow.'
12+
required: false
13+
type: string
914

1015
jobs:
1116
release-please:
17+
if: github.event_name == 'push'
1218
runs-on: ubuntu-latest
1319
outputs:
1420
release_created: ${{ steps.release.outputs['packages/core--release_created'] }}
@@ -51,8 +57,40 @@ jobs:
5157
npm install -g npm@latest
5258
npm publish --provenance --access public
5359
60+
publish-manual:
61+
if: github.event_name == 'workflow_dispatch' && inputs.tag != ''
62+
runs-on: ubuntu-latest
63+
permissions:
64+
contents: read
65+
id-token: write
66+
steps:
67+
- uses: actions/checkout@v4
68+
with:
69+
ref: ${{ inputs.tag }}
70+
71+
- uses: oven-sh/setup-bun@v2
72+
with:
73+
bun-version: latest
74+
75+
- uses: actions/setup-node@v4
76+
with:
77+
node-version: 22
78+
registry-url: https://registry.npmjs.org
79+
80+
- name: Install dependencies
81+
run: bun install
82+
83+
- name: Build
84+
run: bun run build
85+
86+
- name: Publish
87+
working-directory: packages/core
88+
run: |
89+
npm install -g npm@latest
90+
npm publish --provenance --access public
91+
5492
publish-canary:
55-
if: github.ref == 'refs/heads/main'
93+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
5694
runs-on: ubuntu-latest
5795
permissions:
5896
contents: read

0 commit comments

Comments
 (0)