-
Notifications
You must be signed in to change notification settings - Fork 11
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
464ec2f
commit 9fa6758
Showing
2 changed files
with
59 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Build CLI binary | ||
inputs: | ||
platform: | ||
description: Platform that the binary can run on, e.g. linux, macos | ||
required: true | ||
arch: | ||
description: Architecture of CPU that the binary can run on, e.g. arm64, amd64 | ||
required: true | ||
repo_token: | ||
description: API token that gives access to manage the target repo | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: nix --version | ||
shell: bash | ||
- name: Format | ||
shell: bash | ||
run: nix --accept-flake-config fmt -- --fail-on-change | ||
- name: Prevent blst | ||
shell: bash | ||
run: nix --accept-flake-config develop -j auto --command sh -c '[ -z "$(cargo tree | grep blst)" ]' | ||
- name: Build | ||
shell: bash | ||
run: nix --accept-flake-config --log-format raw -L build -j auto .#jstz_cli | ||
- name: Upload binaries to release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ inputs.repo_token }} | ||
file: result/bin/jstz | ||
asset_name: jstz_${{ inputs.platform }}_${{ inputs.arch }} | ||
tag: ${{ github.ref_name }} |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Build npm package for jstz CLI | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
mac: | ||
name: Build CLI for MacOS Arm64 | ||
runs-on: macos | ||
steps: | ||
- uses: jstz-dev/jstz/.github/actions/build-cli@main | ||
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 | ||
with: | ||
platform: linux | ||
arch: amd64 | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} |