Skip to content

Commit d91fb1e

Browse files
mikolalysenkoclaude
andcommitted
Add version bump to publish workflow
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 1c61869 commit d91fb1e

1 file changed

Lines changed: 32 additions & 1 deletion

File tree

.github/workflows/publish.yml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ name: 📦 Publish
33
on:
44
workflow_dispatch:
55
inputs:
6+
version-bump:
7+
description: 'Version bump type'
8+
required: true
9+
type: choice
10+
options:
11+
- patch
12+
- minor
13+
- major
614
dist-tag:
715
description: 'npm dist-tag (latest, next, beta, canary, backport, etc.)'
816
required: false
@@ -12,7 +20,7 @@ on:
1220
description: 'Enable debug output'
1321
required: false
1422
default: '0'
15-
type: string
23+
type: choice
1624
options:
1725
- '0'
1826
- '1'
@@ -22,7 +30,30 @@ permissions:
2230
id-token: write
2331

2432
jobs:
33+
bump-version:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v4
38+
39+
- name: Setup Node.js
40+
uses: actions/setup-node@v4
41+
with:
42+
node-version: '20'
43+
44+
- name: Configure Git
45+
run: |
46+
git config user.name "github-actions[bot]"
47+
git config user.email "github-actions[bot]@users.noreply.github.com"
48+
49+
- name: Bump version
50+
run: npm version ${{ inputs.version-bump }} -m "v%s"
51+
52+
- name: Push changes
53+
run: git push && git push --tags
54+
2555
publish:
56+
needs: bump-version
2657
uses: SocketDev/socket-registry/.github/workflows/provenance.yml@main
2758
with:
2859
debug: ${{ inputs.debug }}

0 commit comments

Comments
 (0)