Manual Asset Updater #4
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
name: Manual Asset Updater | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: The release tag of which the assets should be updated | |
required: true | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build_x86_64: | |
name: Build x86_64 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-12, macos-13, macos-14, ubuntu-20.04, ubuntu-22.04, windows-2019, windows-2022] | |
node: [18, 19, 20, 21, 22] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Use Node.js v${{ matrix.node }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: yarn | |
registry-url: https://registry.yarnpkg.org/ | |
- name: Install dependencies | |
run: yarn --immutable --mode=skip-build | |
- name: Build From Source | |
run: yarn gyp:build-from-source | |
- name: Package prebuild | |
run: yarn build | |
- name: Upload prebuild asset | |
uses: ./scripts/prebuildArtifacts | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
path: 'build/stage/**/*.tar.gz' | |
release-tag: ${{ github.event.inputs.tag }} | |
build_musl_x86_64: | |
name: Prebuild x86_64(musl) | |
runs-on: ubuntu-latest | |
container: | |
image: node:${{ matrix.node }}-alpine | |
strategy: | |
fail-fast: false | |
matrix: | |
node: [18, 19, 20, 21, 22] | |
steps: | |
- name: Setup env with Node v${{ matrix.node }} | |
run: | | |
apk add --update | |
apk add --no-cache ca-certificates git curl build-base python3 g++ make | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: yarn --immutable --mode=skip-build | |
- name: Build From Source | |
run: yarn gyp:build-from-source | |
- name: Package prebuild | |
run: yarn build | |
- name: Upload prebuild asset | |
uses: ./scripts/prebuildArtifacts | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
path: 'build/stage/**/*.tar.gz' | |
release-tag: ${{ github.event.inputs.tag }} | |
build_aarch64: | |
name: Prebuild aarch64 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-20.04, ubuntu-22.04] | |
node: [18, 19, 20, 21, 22] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Use Node.js v${{ matrix.node }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: yarn | |
registry-url: https://registry.yarnpkg.org/ | |
- name: Install dependencies | |
run: yarn --immutable --mode=skip-build | |
- name: Build From Source | |
run: yarn gyp:build-from-source | |
- name: Package prebuild | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu | |
CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ yarn node-pre-gyp --target_arch=arm64 configure build package | |
- name: Make TypeScript Build | |
run: yarn ts:build | |
- name: Upload prebuild asset | |
uses: ./scripts/prebuildArtifacts | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
path: 'build/stage/**/*.tar.gz' | |
release-tag: ${{ github.event.inputs.tag }} | |
build_musl_aarch64: | |
name: Prebuild aarch64(musl) | |
runs-on: ubuntu-latest | |
container: | |
image: node:${{ matrix.node }}-alpine | |
strategy: | |
fail-fast: false | |
matrix: | |
node: [18, 19, 20, 21, 22] | |
steps: | |
- name: Setup env with Node v${{ matrix.node }} | |
run: | | |
apk add --update | |
apk add --no-cache ca-certificates git curl build-base python3 g++ make | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup musl cross compiler | |
run: | | |
curl -OL https://musl.cc/aarch64-linux-musl-cross.tgz | |
tar -xzvf aarch64-linux-musl-cross.tgz | |
$(pwd)/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc --version | |
- name: Install dependencies | |
run: yarn --immutable --mode=skip-build | |
- name: Build From Source | |
run: yarn gyp:build-from-source | |
- name: Package prebuild | |
run: | | |
CC=$(pwd)/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc \ | |
CXX=$(pwd)/aarch64-linux-musl-cross/bin/aarch64-linux-musl-g++ \ | |
yarn node-pre-gyp --target_arch=arm64 configure build package | |
- name: Make TypeScript Build | |
run: yarn ts:build | |
- name: Upload prebuild asset | |
uses: ./scripts/prebuildArtifacts | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
path: 'build/stage/**/*.tar.gz' | |
release-tag: ${{ github.event.inputs.tag }} |