Merge pull request #280 from thegecko/dependabot/npm_and_yarn/typescr… #561
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: prebuild | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- '*' | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
prebuild: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: darwin-x64 | |
os: macos-latest | |
node: x64 | |
- name: darwin-arm64 | |
os: macos-latest | |
node: x64 | |
args: --arch arm64 | |
- name: win32-x86 | |
os: windows-latest | |
node: x86 | |
- name: win32-x64 | |
os: windows-latest | |
node: x64 | |
- name: linux-x64 | |
os: ubuntu-latest | |
node: x64 | |
name: Build ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- if: matrix.node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
architecture: ${{ matrix.node }} | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- if: contains(matrix.os, 'ubuntu') | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libdbus-1-dev | |
- if: contains(matrix.os, 'macos') | |
uses: jwlawson/[email protected] | |
with: | |
cmake-version: '3.21.x' | |
- if: contains(matrix.os, 'windows') | |
uses: microsoft/[email protected] | |
- run: yarn install --ignore-scripts | |
- run: yarn prebuild ${{ matrix.args }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.name }} | |
path: prebuilds/*.tar.gz | |
retention-days: 1 | |
release: | |
needs: prebuild | |
name: Release | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
path: artifacts | |
- uses: softprops/action-gh-release@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: artifacts/*/*.tar.gz |