Skip to content

Commit f76b631

Browse files
committed
feat(ci): 🚀 add version input to publish workflow
* Introduced an optional `version` input for the release workflow. * Updated changelog generation to utilize the provided version input. * Enhances flexibility for versioning during releases.
1 parent 80fe5dc commit f76b631

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/publish.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: 🚀 Release + Publish
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Version to release (e.g. 1.2.3)'
8+
required: false
59

610
permissions:
711
id-token: write
@@ -39,9 +43,11 @@ jobs:
3943
run: bun run preversion
4044

4145
- name: 📜 Generate changelog and release notes
46+
env:
47+
VERSION: ${{ github.event.inputs.version }}
4248
run: |
43-
bunx changelogen --release --push
44-
bunx changelogen github release --token ${{ secrets.GITHUB_TOKEN }}
49+
bunx changelogen --release --push -r $VERSION
50+
bunx changelogen github release --token ${{ secrets.GITHUB_TOKEN }} -r $VERSION
4551
4652
- name: 🛠️ Build package
4753
run: bun run build

0 commit comments

Comments
 (0)