Skip to content

Commit a3e5697

Browse files
committed
ci: release without npm token
1 parent a0cedbe commit a3e5697

File tree

3 files changed

+12
-108
lines changed

3 files changed

+12
-108
lines changed

.github/workflows/release-continuous.yml

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,7 @@ name: Publish Any Commit
22
on: [push, pull_request]
33

44
jobs:
5-
build:
6-
runs-on: ubuntu-latest
7-
8-
steps:
9-
- name: Checkout code
10-
uses: actions/checkout@v4
11-
12-
- name: Install pnpm
13-
uses: pnpm/[email protected]
14-
15-
- uses: actions/setup-node@v4
16-
with:
17-
node-version: lts/*
18-
cache: pnpm
19-
20-
- name: Install dependencies
21-
run: pnpm install
22-
23-
- name: Build
24-
run: pnpm build
25-
26-
- run: pnpx pkg-pr-new publish
5+
release:
6+
uses: sxzz/workflows/.github/workflows/release-pr.yml@v1
7+
with:
8+
compact: true

.github/workflows/release.yml

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,13 @@ on:
44
push:
55
tags:
66
- 'v*'
7-
workflow_dispatch: {}
87

98
jobs:
109
release:
11-
runs-on: ubuntu-latest
10+
uses: sxzz/workflows/.github/workflows/release.yml@v1
11+
with:
12+
publish: true
13+
1214
permissions:
1315
contents: write
1416
id-token: write
15-
16-
steps:
17-
- uses: actions/checkout@v4
18-
with:
19-
fetch-depth: 0
20-
21-
- name: Install pnpm
22-
uses: pnpm/[email protected]
23-
24-
- name: Set node
25-
uses: actions/setup-node@v4
26-
with:
27-
node-version: lts/*
28-
cache: pnpm
29-
registry-url: 'https://registry.npmjs.org'
30-
31-
- run: npx changelogithub
32-
continue-on-error: true
33-
env:
34-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35-
36-
- name: Install Dependencies
37-
run: pnpm i
38-
39-
- name: Publish to NPM
40-
run: pnpm -r publish --access public --no-git-checks
41-
env:
42-
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
43-
NPM_CONFIG_PROVENANCE: true

.github/workflows/unit-test.yml

Lines changed: 4 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -10,58 +10,7 @@ on:
1010
- main
1111

1212
jobs:
13-
lint:
14-
runs-on: ubuntu-latest
15-
steps:
16-
- name: Checkout code
17-
uses: actions/checkout@v4
18-
19-
- name: Install pnpm
20-
uses: pnpm/[email protected]
21-
22-
- name: Set node
23-
uses: actions/setup-node@v4
24-
with:
25-
node-version: lts/*
26-
cache: pnpm
27-
28-
- name: Install
29-
run: pnpm i
30-
31-
- name: Type Check
32-
run: pnpm run typecheck
33-
34-
- name: Lint
35-
run: pnpm run lint
36-
37-
test:
38-
strategy:
39-
matrix:
40-
os: [ubuntu-latest, windows-latest]
41-
node-version: [20, 22, 24]
42-
fail-fast: false
43-
44-
runs-on: ${{ matrix.os }}
45-
steps:
46-
- uses: actions/checkout@v4
47-
48-
- name: Install pnpm
49-
uses: pnpm/[email protected]
50-
51-
- name: Set node ${{ matrix.node-version }}
52-
uses: actions/setup-node@v4
53-
with:
54-
node-version: ${{ matrix.node-version }}
55-
cache: pnpm
56-
57-
- name: Install
58-
run: pnpm i
59-
60-
- name: Build
61-
run: pnpm run build
62-
63-
- name: Build Examples
64-
run: pnpm run -r --parallel build
65-
66-
- name: Unit Test
67-
run: pnpm test
13+
unit-test:
14+
uses: sxzz/workflows/.github/workflows/unit-test.yml@v1
15+
with:
16+
test: pnpm run -r --parallel build && pnpm test

0 commit comments

Comments
 (0)