Skip to content

Commit 01113a3

Browse files
authored
ci: add ci flow 😊 (#55)
1 parent 928d0e2 commit 01113a3

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

‎.github/workflows/release.yml‎ renamed to ‎.github/workflows/ci.yml‎

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
1-
name: Release
1+
name: CI Flow
22

33
on:
4-
- workflow_dispatch
4+
pull_request:
5+
push:
6+
branches:
7+
- main
58

69
jobs:
710
publish:
811
runs-on: ubuntu-latest
12+
13+
if: github.ref == 'refs/heads/main'
14+
915
steps:
1016
- name: Checkout
1117
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
1220

1321
- name: PNPM Install
1422
uses: pnpm/action-setup@v4
@@ -34,8 +42,13 @@ jobs:
3442
- name: Build
3543
run: pnpm build
3644

37-
- name: Publish to npm
38-
working-directory: packages/devtools
39-
run: npm publish --access public
45+
- name: Create Release Pull Request or Publish
46+
if: github.ref == 'refs/heads/main'
47+
id: changesets
48+
uses: changesets/action@v1
49+
with:
50+
publish: pnpm release
4051
env:
52+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4153
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)