Skip to content

Commit d686dd7

Browse files
committed
ci: add ci flow 😊
1 parent 44db08e commit d686dd7

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed
Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
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
912
steps:
1013
- name: Checkout
1114
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
1217

1318
- name: PNPM Install
1419
uses: pnpm/action-setup@v4
@@ -34,8 +39,13 @@ jobs:
3439
- name: Build
3540
run: pnpm build
3641

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

0 commit comments

Comments
 (0)