Skip to content

Commit 35b820a

Browse files
committed
chore: use Pantry action for publish-commit and add job dependencies
1 parent 4afffd7 commit 35b820a

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,16 @@ jobs:
8484
run: bun test
8585

8686
publish-commit:
87+
needs: [lint, typecheck, test]
8788
runs-on: ubuntu-latest
8889

8990
steps:
90-
- uses: actions/checkout@v4
91-
92-
- name: Install Bun
93-
uses: oven-sh/setup-bun@v2
94-
95-
- name: Use cached node_modules
96-
uses: actions/cache@v4
91+
- uses: actions/checkout@v6
9792
with:
98-
path: node_modules
99-
key: node-modules-${{ hashFiles('**/bun.lock') }}
100-
restore-keys: |
101-
node-modules-
93+
fetch-depth: 0
94+
95+
- name: Setup Pantry
96+
uses: home-lang/pantry/packages/action@main
10297

10398
- name: Install Dependencies
10499
run: bun install
@@ -107,4 +102,7 @@ jobs:
107102
run: bun run build
108103

109104
- name: Publish Commit
110-
run: bunx pkg-pr-new publish './packages/*'
105+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
106+
run: pantry publish:commit './packages/*'
107+
env:
108+
PANTRY_REGISTRY_TOKEN: ${{ secrets.PANTRY_TOKEN }}

0 commit comments

Comments
 (0)