Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 0 additions & 71 deletions .github/workflows/publish.yml

This file was deleted.

85 changes: 42 additions & 43 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,55 @@
name: Releaser
name: Publish to NPM

on:
push:
tags:
- 'v*'
workflow_dispatch:

jobs:
npm:
name: npm
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Bun
uses: oven-sh/setup-bun@v2
# env:
# BUN_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
with:
bun-version: latest

- name: Use cached node_modules
uses: actions/cache@v4
with:
path: node_modules
key: node-modules-${{ hashFiles('**/bun.lock') }}
restore-keys: |
node-modules-

- name: Install Dependencies
run: bun install

- name: Publish to npm
run: ./scripts/publish.sh
env:
BUN_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

- name: Create GitHub release
run: bunx changelogithub
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Checkout
uses: actions/checkout@v4

- name: Attach Binaries
uses: stacksjs/action-releaser@v1.1.0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
files: |
packages/headwind/bin/headwind-linux-x64.zip
packages/headwind/bin/headwind-linux-arm64.zip
packages/headwind/bin/headwind-windows-x64.zip
packages/headwind/bin/headwind-darwin-x64.zip
packages/headwind/bin/headwind-darwin-arm64.zip
node-version: '24'
registry-url: 'https://registry.npmjs.org'

- name: Setup Zig
run: |
curl -L https://ziglang.org/builds/zig-x86_64-linux-0.16.0-dev.1859+212968c57.tar.xz -o zig.tar.xz
tar -xf zig.tar.xz
mv zig-x86_64-linux-0.16.0-dev.1859+212968c57 zig
echo "$PWD/zig" >> $GITHUB_PATH

- name: Verify Zig
run: zig version

- name: Build pantry from source
run: |
git clone --depth 1 https://github.com/home-lang/pantry.git ../pantry
cd ../pantry/packages/zig
mkdir -p pantry
cd pantry
git clone --depth 1 https://github.com/zig-utils/zig-cli.git
git clone --depth 1 https://github.com/zig-utils/zig-config.git
git clone --depth 1 https://github.com/zig-utils/zig-test-framework.git

- name: Compile pantry
run: |
cd ../pantry/packages/zig
zig build
echo "$PWD/zig-out/bin" >> $GITHUB_PATH

- name: Publish
run: pantry publish --access public
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Loading
Loading