Skip to content

Commit 5146f67

Browse files
committed
set publish
1 parent 85d96b1 commit 5146f67

File tree

3 files changed

+52
-1
lines changed

3 files changed

+52
-1
lines changed

.github/workflows/publish.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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 }}

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and 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

go.wasm

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)