Skip to content

Commit d83a71c

Browse files
committed
ci: add CI job and update release workflow
1 parent ed82127 commit d83a71c

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

.github/workflows/release.yml

+33-1
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,42 @@ on:
88
concurrency: ${{ github.workflow }}-${{ github.ref }}
99

1010
jobs:
11+
ci:
12+
name: CI
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout Repo
16+
uses: actions/checkout@v3
17+
18+
- name: Setup pnpm
19+
uses: pnpm/action-setup@v4
20+
with:
21+
run_install: false
22+
23+
- name: Setup node
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 20
27+
cache: 'pnpm'
28+
29+
- name: Install dependencies
30+
run: pnpm install
31+
32+
- name: Run lint
33+
run: pnpm lint
34+
35+
- name: Build
36+
run: pnpm build
37+
38+
- name: Run tests
39+
run: pnpm test
40+
env:
41+
SQUARE_API_KEY: ${{ secrets.SQUARE_API_KEY }}
42+
1143
release:
1244
name: Release
1345
runs-on: ubuntu-latest
46+
needs: ci
1447
steps:
1548
- name: Checkout Repo
1649
uses: actions/checkout@v3
@@ -35,7 +68,6 @@ jobs:
3568
with:
3669
publish: pnpm run release
3770
env:
38-
SQUARE_API_KEY: ${{ secrets.SQUARE_API_KEY }}
3971
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4072
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4173

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88
"packageManager": "pnpm@10.9.0",
99
"type": "module",
1010
"scripts": {
11-
"release": "pnpm lint && pnpm build && pnpm test && changeset publish",
11+
"release": "pnpm build && changeset publish",
1212
"build": "tsup ./src",
1313
"check-types": "tsc --noEmit",
1414
"lint": "biome check --write .",
15+
"lint:ci": "biome check .",
1516
"test": "node --test test/*.test.js"
1617
},
1718
"engines": {

0 commit comments

Comments
 (0)