Skip to content

Commit aa39ed1

Browse files
chore: wip
1 parent c7ee95d commit aa39ed1

File tree

1 file changed

+40
-37
lines changed

1 file changed

+40
-37
lines changed

.github/workflows/release.yml

Lines changed: 40 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -4,49 +4,52 @@ on:
44
push:
55
tags:
66
- 'v*'
7+
workflow_dispatch:
78

89
jobs:
910
npm:
10-
name: npm
1111
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
id-token: write
1215

1316
steps:
14-
- uses: actions/checkout@v6
15-
with:
16-
fetch-depth: 0
17-
18-
- name: Install Bun
19-
uses: oven-sh/setup-bun@v2
20-
21-
- name: Use cached node_modules
22-
uses: actions/cache@v5
23-
with:
24-
path: node_modules
25-
key: node-modules-${{ hashFiles('**/bun.lock') }}
26-
restore-keys: |
27-
node-modules-
28-
29-
- name: Install Dependencies
30-
run: bun install
31-
32-
- name: Publish to npm
33-
run: bun publish --access public
34-
env:
35-
BUN_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
36-
37-
- name: Create GitHub release
38-
run: bunx changelogithub
39-
env:
40-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
17+
- name: Checkout
18+
uses: actions/checkout@v4
4119

42-
- name: Attach Binaries
43-
uses: softprops/action-gh-release@v2
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
4422
with:
45-
files: |
46-
bin/bin-name-linux-x64
47-
bin/bin-name-linux-arm64
48-
bin/bin-name-windows-x64.exe
49-
bin/bin-name-darwin-x64
50-
bin/bin-name-darwin-arm64
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
5154
env:
52-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)