-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9fa6758
commit 73f70a0
Showing
1 changed file
with
34 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,25 +2,44 @@ name: Build npm package for jstz CLI | |
|
||
on: | ||
push: | ||
branches: [huanchengchang-jstz-275-1] | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
mac: | ||
name: Build CLI for MacOS Arm64 | ||
runs-on: macos | ||
linux-arm64: | ||
name: Build CLI for Linux Arm64 | ||
runs-on: ubuntu-24.04-arm | ||
container: | ||
image: alpine | ||
volumes: | ||
- /:/host # Jailbreak! | ||
steps: | ||
- uses: jstz-dev/jstz/.github/actions/build-cli@main | ||
- name: Patch native Alpine NodeJS into Runner environment | ||
if: runner.os == 'Linux' | ||
run: | | ||
apk add nodejs | ||
sed -i "s:ID=alpine:ID=NotpineForGHA:" /etc/os-release | ||
cd /host/home/runner/runners/*/externals/ | ||
rm -rf node20/* | ||
mkdir node20/bin | ||
ln -s /usr/bin/node node20/bin/node | ||
shell: sh # No bash in Alpine by default | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/[email protected] | ||
with: | ||
platform: macos | ||
arch: arm64 | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
linux-amd64: | ||
name: Build CLI for Linux AMD64 | ||
runs-on: [x86_64, linux, nix] | ||
steps: | ||
- uses: jstz-dev/jstz/.github/actions/build-cli@main | ||
targets: wasm32-unknown-unknown | ||
- name: Install dependencies | ||
shell: sh | ||
run: apk add curl make musl-dev libcrypto3 openssl-dev clang gcc wget curl vim musl-dev libstdc++ curl-dev libffi-dev g++ openssl-libs-static | ||
- name: Build | ||
shell: sh | ||
run: make build-cli | ||
- name: Upload binaries to release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
platform: linux | ||
arch: amd64 | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
repo_name: huancheng-trili/test-cli | ||
repo_token: ${{ secrets.TEST_RELEASE }} | ||
file: target/release/jstz | ||
asset_name: jstz_linux_arm64 | ||
tag: ${{ github.ref_name }} |