Skip to content

v1.10.1

v1.10.1 #122

Workflow file for this run

name: Build
on:
release:
types:
- created
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
target:
- runs-on: windows-latest
platform: windows
- runs-on: ubuntu-latest
platform: linux
- runs-on: ubuntu-latest
platform: linux
emulate: arm64
- runs-on: macos-latest
platform: darwin
runs-on: ${{ matrix.target.runs-on }}
steps:
- name: Set up variables
id: vars
shell: bash
run: |
echo "NODE_VERSION=${{ matrix.target.node || '18' }}" >> $GITHUB_OUTPUT
echo "ARCH=${{ matrix.target.emulate || 'amd64' }}" >> $GITHUB_OUTPUT
- name: Install nix (for arm64)
if: ${{ matrix.target.emulate }}
uses: cachix/install-nix-action@v20
- name: Set up qemu and binfmt (for arm64)
if: ${{ matrix.target.emulate }}
uses: docker/setup-qemu-action@v2
with:
platforms: ${{ matrix.target.emulate }}
- name: Check out
uses: actions/checkout@v3
with:
ref: develop
- name: Set up Node
if: ${{ !matrix.target.emulate }}
uses: actions/setup-node@v3
with:
node-version: ${{ steps.vars.outputs.NODE_VERSION }}
- name: Set up Node (for arm64)
if: ${{ matrix.target.emulate == 'arm64' }}
run: |
nix profile install github:NixOS/nixpkgs/7dc71aef32e8faf065cb171700792cf8a65c152d#nodejs-${{ steps.vars.outputs.NODE_VERSION }}_x --option system aarch64-linux
- name: Install zip (for windows)
if: ${{ matrix.target.platform == 'windows' }}
run: choco install zip
- name: Prepare
run: bash .github/workflows/prepare.sh
- name: Install dependencies
run: |
curl -o $RUNNER_TEMP/yarn.cjs https://repo.yarnpkg.com/3.2.0/packages/yarnpkg-cli/bin/yarn.js
node $RUNNER_TEMP/yarn.cjs install --no-immutable
- name: Pack file
run: bash .github/workflows/pack.sh
- name: Upload asset
shell: bash
run: >
bash .github/workflows/upload.sh
'${{ matrix.target.platform }}-${{ steps.vars.outputs.ARCH }}-node${{ steps.vars.outputs.NODE_VERSION }}'
env:
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
docker:
runs-on: ubuntu-latest
needs: build
steps:
- name: Check out
uses: actions/checkout@v3
- name: Trigger docker build
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
if: ${{ env.DOCKER_USERNAME != null }}
run: gh workflow run Docker