ReviewOS

also looking at this

stacks/ts-css

feat: new release script using pantry

#14
Merged glennmichael123 wants to merge feat/pantry-release into main
4 files +536 -954
.github/workflows/release.ymlmodified+42-43
Changes to .github/workflows/release.yml
@@ -1,56 +1,55 @@
1name: Releaser
1name: Publish to NPM
22
33on:
44 push:
55 tags:
66 - 'v*'
7 workflow_dispatch:
78
89jobs:
9 npm:
10 name: npm
10 publish:
1111 runs-on: ubuntu-latest
12 permissions:
13 contents: read
14 id-token: write
1215
1316 steps:
14 - uses: actions/checkout@v4
15 with:
16 fetch-depth: 0
17
18 - name: Install Bun
19 uses: oven-sh/setup-bun@v2
20 # env:
21 # BUN_AUTH_TOKEN: $
22 with:
23 bun-version: latest
24
25 - name: Use cached node_modules
26 uses: actions/cache@v4
27 with:
28 path: node_modules
29 key: node-modules-${{ hashFiles('**/bun.lock') }}
30 restore-keys: |
31 node-modules-
32
33 - name: Install Dependencies
34 run: bun install
35
36 - name: Publish to npm
37 run: ./scripts/publish.sh
38 env:
39 BUN_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
40
41 - name: Create GitHub release
42 run: bunx changelogithub
43 env:
44 GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
17 - name: Checkout
18 uses: actions/checkout@v4
4519
46 - name: Attach Binaries
47 uses: stacksjs/action-releaser@v1.1.0
20 - name: Setup Node.js
21 uses: actions/setup-node@v4
4822 with:
49 files: |
50 packages/headwind/bin/headwind-linux-x64.zip
51 packages/headwind/bin/headwind-linux-arm64.zip
52 packages/headwind/bin/headwind-windows-x64.zip
53 packages/headwind/bin/headwind-darwin-x64.zip
54 packages/headwind/bin/headwind-darwin-arm64.zip
23 node-version: '24'
24 registry-url: 'https://registry.npmjs.org'
25
26 - name: Setup Zig
27 run: |
28 curl -L https://ziglang.org/builds/zig-x86_64-linux-0.16.0-dev.1859+212968c57.tar.xz -o zig.tar.xz
29 tar -xf zig.tar.xz
30 mv zig-x86_64-linux-0.16.0-dev.1859+212968c57 zig
31 echo "$PWD/zig" >> $GITHUB_PATH
32
33 - name: Verify Zig
34 run: zig version
35
36 - name: Build pantry from source
37 run: |
38 git clone --depth 1 https://github.com/home-lang/pantry.git ../pantry
39 cd ../pantry/packages/zig
40 mkdir -p pantry
41 cd pantry
42 git clone --depth 1 https://github.com/zig-utils/zig-cli.git
43 git clone --depth 1 https://github.com/zig-utils/zig-config.git
44 git clone --depth 1 https://github.com/zig-utils/zig-test-framework.git
45
46 - name: Compile pantry
47 run: |
48 cd ../pantry/packages/zig
49 zig build
50 echo "$PWD/zig-out/bin" >> $GITHUB_PATH
51
52 - name: Publish
53 run: pantry publish --access public
5554 env:
56 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55 NPM_TOKEN: ${{ secrets.NPM_TOKEN }}