Skip to content

ci: build and upload cli binary #41

ci: build and upload cli binary

ci: build and upload cli binary #41

Workflow file for this run

name: Build npm package for jstz CLI
on:
push:
branches: [huanchengchang-jstz-275-1]
tags:
- "*"
jobs:
linux-arm64:
name: Build CLI for Linux Arm64
runs-on: ubuntu-24.04-arm
container:
image: alpine
volumes:
- /:/host
steps:
# hack for github actions to work with arm64
# https://github.com/actions/runner/issues/801#issuecomment-2394425757
- 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
- name: Install dependencies
shell: sh
run: apk add make musl-dev libcrypto3 openssl-dev clang gcc musl-dev libstdc++ libffi-dev g++ openssl-libs-static bash
# bash is required by dtolnay/rust-toolchain
- uses: actions/checkout@v4
- uses: dtolnay/[email protected]
with:
targets: wasm32-unknown-unknown
- name: Build
shell: sh
run: make build-cli
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_name: huancheng-trili/test-cli
repo_token: ${{ secrets.TEST_RELEASE }}
file: target/release/jstz
asset_name: jstz_linux_arm64
tag: ${{ github.ref_name }}