Skip to content

Commit d6a3b77

Browse files
committed
build: fix publish scripts
1 parent 011e776 commit d6a3b77

File tree

2 files changed

+29
-26
lines changed

2 files changed

+29
-26
lines changed

.github/workflows/ci.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,10 @@ jobs:
1515
- name: Setup Node.js
1616
uses: actions/setup-node@v3
1717
with:
18-
node-version: '18'
18+
node-version: 20
1919

2020
- name: Setup pnpm
21-
uses: pnpm/action-setup@v2
22-
with:
23-
version: 8
21+
uses: pnpm/action-setup@v4
2422

2523
- name: Install dependencies
2624
run: pnpm install

.github/workflows/release.yml

+27-22
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,40 @@
1-
name: Publish to NPM
1+
name: Release
22

33
on:
44
push:
5-
tags:
6-
- 'v*'
5+
branches:
6+
- main # or your default branch
7+
8+
concurrency: ${{ github.workflow }}-${{ github.ref }}
79

810
jobs:
9-
publish:
11+
release:
12+
name: Release
1013
runs-on: ubuntu-latest
1114
steps:
12-
- uses: actions/checkout@v3
13-
15+
- name: Checkout Repo
16+
uses: actions/checkout@v3
17+
1418
- name: Setup Node.js
1519
uses: actions/setup-node@v3
1620
with:
17-
node-version: '18'
18-
registry-url: 'https://registry.npmjs.org'
19-
21+
node-version: 20
22+
2023
- name: Setup pnpm
21-
uses: pnpm/action-setup@v2
22-
with:
23-
version: 8
24-
25-
- name: Install dependencies
24+
uses: pnpm/action-setup@v4
25+
26+
- name: Install Dependencies
2627
run: pnpm install
27-
28-
- name: Build
29-
run: pnpm build
30-
31-
- name: Publish to NPM
32-
run: pnpm publish --no-git-checks
33-
env:
34-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3528

29+
- name: Build Packages
30+
run: |
31+
pnpm build --no-cache
32+
33+
- name: Create Release Pull Request or Publish to npm
34+
id: changesets
35+
uses: changesets/action@v1
36+
with:
37+
publish: pnpm release
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)