File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Haiti-Utils CI
1+ name : Haiti-Utils CI/CD
22
33on :
44 push :
77 pull_request :
88 branches :
99 - main
10+ release :
11+ types : [created]
1012
1113jobs :
1214 test :
1315 name : Run Tests
1416 runs-on : ubuntu-latest
15-
1617 steps :
1718 - name : Checkout repository
1819 uses : actions/checkout@v3
2526
2627 - name : Run tests
2728 run : bun test
29+
30+ publish :
31+ name : Build and Publish
32+ runs-on : ubuntu-latest
33+ needs : test
34+ if : github.event_name == 'release' && github.event.action == 'created'
35+
36+ steps :
37+ - name : Checkout repository
38+ uses : actions/checkout@v3
39+
40+ - name : Setup Bun
41+ uses : oven-sh/setup-bun@v1
42+
43+ - name : Install dependencies
44+ run : bun install
45+
46+ - name : Build package
47+ run : bun run build
48+
49+ - name : Publish to npm
50+ run : bunx publint && bun publish --no-git-checks
51+ env :
52+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments