Skip to content

Commit b9f7927

Browse files
committed
Fix cicd
1 parent d62a278 commit b9f7927

File tree

2 files changed

+63
-65
lines changed

2 files changed

+63
-65
lines changed

.github/workflows/check-pr.yml

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
1-
name: Check Pull Request
2-
on:
3-
pull_request:
4-
branches:
5-
- main
6-
jobs:
7-
check:
8-
concurrency:
9-
group: ${{ github.workflow }}-${{ github.ref }}
10-
cancel-in-progress: true
11-
runs-on: ubuntu-latest
12-
steps:
13-
- name: Checkout
14-
uses: actions/checkout@v4
15-
- uses: pnpm/action-setup@v4
16-
name: Install pnpm
17-
- name: Install Node.js
18-
uses: actions/setup-node@v4
19-
with:
20-
node-version: 22
21-
cache: 'pnpm'
22-
registry-url: 'https://registry.npmjs.org'
23-
24-
- run: pnpm i
25-
- run: |
26-
pnpm build
27-
pnpm lint
28-
pnpm test
1+
name: Check Pull Request
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
jobs:
7+
check:
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
- uses: oven-sh/setup-bun@v2
16+
- name: Install Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 24
20+
cache: 'bun'
21+
registry-url: 'https://registry.npmjs.org'
22+
23+
- run: bun i
24+
- run: |
25+
bun lint
26+
bun test
27+
bun build

.github/workflows/publish.yml

Lines changed: 36 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,36 @@
1-
name: Publish Package to npm
2-
3-
on:
4-
push:
5-
branches:
6-
- main
7-
8-
jobs:
9-
publish:
10-
runs-on: ubuntu-latest
11-
concurrency:
12-
group: ${{ github.workflow }}-${{ github.ref }}
13-
cancel-in-progress: false
14-
steps:
15-
- name: Checkout
16-
uses: actions/checkout@v4
17-
- uses: pnpm/action-setup@v4
18-
name: Install pnpm
19-
- name: Install Node.js
20-
uses: actions/setup-node@v4
21-
with:
22-
registry-url: "https://registry.npmjs.org"
23-
node-version: 22
24-
cache: 'pnpm'
25-
- run: pnpm i
26-
- run: |
27-
pnpm build
28-
pnpm lint
29-
pnpm test
30-
- name: Create Release Pull Request or Publish to npm
31-
id: changesets
32-
uses: changesets/action@v1
33-
with:
34-
publish: pnpm publish --access=public
35-
env:
36-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1+
name: Publish Package to npm
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: false
14+
permissions:
15+
# create pull request comments
16+
pull-requests: write
17+
18+
# Actions > General > Workflow permissions for creating pull request
19+
# Create brench to create pull request
20+
contents: write
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
- uses: oven-sh/setup-bun@v2
25+
- run: bun i
26+
- run: |
27+
bun lint
28+
bun test
29+
bun build
30+
- uses: changepacks/action@main
31+
id: changepacks
32+
with:
33+
publish: true
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)