Skip to content

Commit cf93b1c

Browse files
2 parents 942aea5 + c8bdac0 commit cf93b1c

3 files changed

Lines changed: 41 additions & 3 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish to npm
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 20
20+
registry-url: https://registry.npmjs.org/
21+
22+
- name: Install dependencies
23+
run: npm ci
24+
25+
- name: Build project (optional)
26+
run: npm run build --if-present
27+
28+
- name: Bump version
29+
run: |
30+
git config --global user.name "github-actions[bot]"
31+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
32+
npm version patch -m "chore: bump version to %s [skip ci]"
33+
git push origin main --follow-tags
34+
35+
- name: Publish to npm
36+
run: npm publish --access public
37+
env:
38+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hackpack-cli",
3-
"version": "1.0.11",
3+
"version": "1.0.12",
44
"description": "A CLI tool to accelerate project setup and automation.",
55
"main": "bin/index.js",
66
"bin": {

0 commit comments

Comments
 (0)