also looking at this
feat: new release script using pantry
#50
2 files
+47
-13
Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.
| @@ -1,4 +1,4 @@ | ||
| 1 | name: CI | |
| 1 | name: Releaser | |
| 2 | 2 | |
| 3 | 3 | on: |
| 4 | 4 | push: |
| @@ -7,27 +7,29 @@ on: | ||
| 7 | 7 | |
| 8 | 8 | jobs: |
| 9 | 9 | release: |
| 10 | name: Release | |
| 10 | name: release | |
| 11 | 11 | runs-on: ubuntu-latest |
| 12 | 12 | |
| 13 | 13 | steps: |
| 14 | - uses: actions/checkout@v6 | |
| 14 | - uses: actions/checkout@v4 | |
| 15 | 15 | with: |
| 16 | 16 | fetch-depth: 0 |
| 17 | 17 | |
| 18 | - name: Set Node.js | |
| 19 | uses: actions/setup-node@v6 | |
| 18 | - name: Setup Bun | |
| 19 | uses: oven-sh/setup-bun@v2 | |
| 20 | 20 | with: |
| 21 | registry-url: 'https://registry.npmjs.org' | |
| 21 | bun-version: latest | |
| 22 | 22 | |
| 23 | - name: Install Bun | |
| 24 | uses: oven-sh/setup-bun@v2 | |
| 23 | - name: Setup pantry | |
| 24 | uses: stacksjs/pantry@v0.7 | |
| 25 | with: | |
| 26 | setup-only: 'true' | |
| 25 | 27 | |
| 26 | 28 | - name: Use cached node_modules |
| 27 | 29 | uses: actions/cache@v4 |
| 28 | 30 | with: |
| 29 | 31 | path: node_modules |
| 30 | key: node-modules-${{ hashFiles('**/bun.lockb') }} | |
| 32 | key: node-modules-${{ hashFiles('**/bun.lock') }} | |
| 31 | 33 | restore-keys: | |
| 32 | 34 | node-modules- |
| 33 | 35 | |
| @@ -38,11 +40,11 @@ jobs: | ||
| 38 | 40 | run: bun run build |
| 39 | 41 | |
| 40 | 42 | - name: Publish to npm |
| 41 | run: npm publish --access public --no-git-checks | |
| 43 | run: pantry publish --access public | |
| 42 | 44 | env: |
| 43 | NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
| 45 | BUN_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
| 44 | 46 | |
| 45 | 47 | - name: Create GitHub release |
| 46 | run: npx changelogithub | |
| 48 | run: bunx changelogithub | |
| 47 | 49 | env: |
| 48 | 50 | GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |