also looking at this
feat: new release script using pantry
#14
4 files
+536
-954
| @@ -1,71 +0,0 @@ | ||
| 1 | name: Publish to NPM | |
| 2 | ||
| 3 | on: | |
| 4 | workflow_dispatch: | |
| 5 | inputs: | |
| 6 | dry_run: | |
| 7 | description: 'Dry run (do not actually publish)' | |
| 8 | required: false | |
| 9 | default: true | |
| 10 | type: boolean | |
| 11 | ||
| 12 | jobs: | |
| 13 | publish: | |
| 14 | runs-on: ubuntu-latest | |
| 15 | permissions: | |
| 16 | contents: read | |
| 17 | id-token: write | |
| 18 | ||
| 19 | steps: | |
| 20 | - name: Checkout | |
| 21 | uses: actions/checkout@v4 | |
| 22 | ||
| 23 | - name: Setup Node.js | |
| 24 | uses: actions/setup-node@v4 | |
| 25 | with: | |
| 26 | node-version: '24' | |
| 27 | registry-url: 'https://registry.npmjs.org' | |
| 28 | ||
| 29 | - name: Setup Zig | |
| 30 | run: | | |
| 31 | curl -L https://ziglang.org/builds/zig-x86_64-linux-0.16.0-dev.1859+212968c57.tar.xz -o zig.tar.xz | |
| 32 | tar -xf zig.tar.xz | |
| 33 | mv zig-x86_64-linux-0.16.0-dev.1859+212968c57 zig | |
| 34 | echo "$PWD/zig" >> $GITHUB_PATH | |
| 35 | ||
| 36 | - name: Verify Zig | |
| 37 | run: zig version | |
| 38 | ||
| 39 | - name: Build pantry from source | |
| 40 | run: | | |
| 41 | git clone --depth 1 https://github.com/home-lang/pantry.git ../pantry | |
| 42 | cd ../pantry/packages/zig | |
| 43 | mkdir -p pantry | |
| 44 | cd pantry | |
| 45 | git clone --depth 1 https://github.com/zig-utils/zig-cli.git | |
| 46 | git clone --depth 1 https://github.com/zig-utils/zig-config.git | |
| 47 | git clone --depth 1 https://github.com/zig-utils/zig-test-framework.git | |
| 48 | ||
| 49 | - name: Compile pantry | |
| 50 | run: | | |
| 51 | cd ../pantry/packages/zig | |
| 52 | zig build | |
| 53 | echo "$PWD/zig-out/bin" >> $GITHUB_PATH | |
| 54 | ||
| 55 | - name: Verify pantry | |
| 56 | run: pantry --version | |
| 57 | ||
| 58 | # TODO: Add build step (tsup/esbuild) once bun is removed | |
| 59 | # - name: Build | |
| 60 | # run: npx tsup src/index.ts --format esm,cjs --dts | |
| 61 | # working-directory: packages/headwind | |
| 62 | ||
| 63 | - name: Publish (Dry Run) | |
| 64 | if: ${{ inputs.dry_run == true }} | |
| 65 | run: pantry publish --dry-run --access public | |
| 66 | working-directory: packages/headwind | |
| 67 | ||
| 68 | - name: Publish | |
| 69 | if: ${{ inputs.dry_run == false }} | |
| 70 | run: pantry publish --access public | |
| 71 | working-directory: packages/headwind | |