feat: release binaries #34
Workflow file for this run
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: release | |
on: | |
pull_request: # remove me when ready | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
check: | |
name: Check version | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.version.outputs.version }} | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Check version changes | |
uses: EndBug/version-check@36ff30f37c7deabe56a30caa043d127be658c425 | |
id: version | |
with: | |
diff-search: true | |
file-name: package.json | |
build: | |
strategy: | |
matrix: | |
include: | |
- os: windows-2022 | |
target: x86_64-pc-windows-msvc | |
code-target: win32-x64 | |
- os: ubuntu-20.04 | |
target: x86_64-unknown-linux-gnu | |
code-target: linux-x64 | |
- os: macos-14 | |
target: aarch64-apple-darwin | |
code-target: darwin-arm64 | |
name: Package ${{ matrix.code-target }} | |
runs-on: ${{ matrix.os }} | |
needs: check | |
env: | |
version: ${{ needs.check.outputs.version }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Install Node.js | |
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 | |
with: | |
node-version-file: '.nvmrc' | |
- name: Install linux toolchain | |
if: matrix.code-target == 'linux-x64' | |
run: | | |
sudo apt install nsis p7zip-full p7zip-rar -y | |
- name: Install win32 toolchain | |
if: matrix.code-target == 'win32-x64' | |
run: | | |
choco install 7zip nsis grep gnuwin32-coreutils.install -y | |
echo "C:\Program Files (x86)\GnuWin32\bin" >> $GITHUB_PATH | |
- name: Install npm dependencies | |
run: npm ci | |
- name: Build javascript | |
run: npm run build | |
- name: Build binaries | |
run: | | |
cd packages/cli-${{ matrix.code-target }} | |
npm ci | |
npm run pack |