Skip to content

Commit f8c9528

Browse files
committed
fix
1 parent bd8d49f commit f8c9528

2 files changed

Lines changed: 27 additions & 40 deletions

File tree

.github/workflows/ci.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Haiti-Utils CI
1+
name: Haiti-Utils CI/CD
22

33
on:
44
push:
@@ -7,12 +7,13 @@ on:
77
pull_request:
88
branches:
99
- main
10+
release:
11+
types: [created]
1012

1113
jobs:
1214
test:
1315
name: Run Tests
1416
runs-on: ubuntu-latest
15-
1617
steps:
1718
- name: Checkout repository
1819
uses: actions/checkout@v3
@@ -25,3 +26,27 @@ jobs:
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 }}

haiti utils.txt

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)