Skip to content

Commit 0227cb1

Browse files
committed
ci: add ci and releaser
1 parent 5668c9d commit 0227cb1

File tree

4 files changed

+317
-2
lines changed

4 files changed

+317
-2
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: ⚙️ ci
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
ci:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4.1.5
13+
- run: corepack enable
14+
- uses: actions/setup-node@v4.0.2
15+
with:
16+
node-version: 20.x
17+
registry-url: https://registry.npmjs.org/
18+
cache: pnpm
19+
20+
- name: Install dependencies
21+
run: pnpm install --no-frozen-lockfile
22+
23+
- name: Build
24+
run: pnpm build

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: 🚀 release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions: {}
8+
9+
jobs:
10+
release:
11+
permissions:
12+
id-token: write
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 20
15+
steps:
16+
- uses: actions/checkout@v4.1.5
17+
- run: corepack enable
18+
- uses: actions/setup-node@v4.0.2
19+
with:
20+
node-version: 20.x
21+
registry-url: https://registry.npmjs.org/
22+
cache: pnpm
23+
24+
- name: Install dependencies
25+
run: pnpm install --no-frozen-lockfile
26+
27+
- name: Build
28+
run: pnpm build
29+
30+
- name: Release
31+
run: pnpm publish --access public --no-git-checks --tag latest
32+
env:
33+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
34+
NPM_CONFIG_PROVENANCE: true

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212
"*.d.ts"
1313
],
1414
"scripts": {
15+
"lint": "prettier --write .",
1516
"prepack": "unbuild",
1617
"start": "node ./bin/index.mjs",
17-
"lint": "prettier --write ."
18+
"release": "changelogen --release"
1819
},
1920
"resolutions": {
2021
"@harmonix-js/core": "link:."
@@ -30,6 +31,7 @@
3031
},
3132
"devDependencies": {
3233
"@types/node": "^20.12.8",
34+
"changelogen": "^0.5.5",
3335
"prettier": "^3.2.5",
3436
"ts-node": "^10.9.2",
3537
"typescript": "^5.4.5",

0 commit comments

Comments
 (0)