File tree Expand file tree Collapse file tree 3 files changed +52
-1
lines changed Expand file tree Collapse file tree 3 files changed +52
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Publish to npm
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ jobs :
9+ publish :
10+ # Prevent infinite loop from version bump commits
11+ if : !startsWith(github.event.head_commit.message, 'chore: release')
12+ runs-on : ubuntu-latest
13+ permissions :
14+ contents : write # Needed to push the new version commit and tag
15+
16+ steps :
17+ - name : Checkout repository
18+ uses : actions/checkout@v4
19+ # Fetch all history to enable correct version bumping
20+ with :
21+ fetch-depth : 0
22+
23+ - name : Set up Node.js
24+ uses : actions/setup-node@v4
25+ with :
26+ node-version : ' 18'
27+ registry-url : ' https://registry.npmjs.org'
28+
29+ - name : Set up Go
30+ uses : actions/setup-go@v5
31+ with :
32+ go-version : ' 1.21'
33+
34+ - name : Install dependencies
35+ run : npm ci
36+
37+ - name : Configure Git
38+ run : |
39+ git config --global user.name 'github-actions[bot]'
40+ git config --global user.email 'github-actions[bot]@users.noreply.github.com'
41+
42+ - name : Bump version and publish
43+ run : |
44+ # Create a new version, commit, and tag
45+ npm version patch -m "chore: release %s"
46+ # Push the changes back to the repository
47+ git push --follow-tags
48+ # Publish to npm
49+ npm publish
50+ env :
51+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
66and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
77
8- ## [ 0.1.0] - YYYY-MM-DD
8+ ## [ 0.1.0] - 2025-07-06
99
1010### Added
1111
You can’t perform that action at this time.
0 commit comments