more explicit matrix #15
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: Package and Release | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
node: [18, 20] | |
arch: [x86_64, arm64] | |
include: | |
- os: macos-latest | |
arch: x86_64 | |
node: 18 | |
- os: macos-latest | |
arch: arm64 | |
node: 18 | |
- os: macos-latest | |
arch: x86_64 | |
node: 20 | |
- os: macos-latest | |
arch: arm64 | |
node: 20 | |
- os: ubuntu-latest | |
arch: x86_64 | |
node: 18 | |
- os: ubuntu-latest | |
arch: arm64 | |
node: 18 | |
- os: ubuntu-latest | |
arch: x86_64 | |
node: 20 | |
- os: ubuntu-latest | |
arch: arm64 | |
node: 20 | |
- os: windows-latest | |
arch: x86_64 | |
node: 18 | |
- os: windows-latest | |
arch: x86_64 | |
node: 20 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Node.js ${{ matrix.node }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Install dependencies | |
run: npm install | |
- name: Zip files (Windows) | |
if: runner.os == 'Windows' | |
run: powershell.exe -Command "Compress-Archive -Path . -DestinationPath evidence-${{ matrix.os }}-${{ matrix.arch }}-node${{ matrix.node }}.zip -Force" | |
- name: Zip files (Unix) | |
if: runner.os != 'Windows' | |
run: zip -r evidence-${{ matrix.os }}-${{ matrix.arch }}-node${{ matrix.node }}.zip . -x "*.git*" | |
- name: Upload to GH release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: evidence-${{ matrix.os }}-${{ matrix.arch }}-node${{ matrix.node }}.zip | |
token: ${{ secrets.GH_ACTIONS_RELEASE_TOKEN }} | |
name: Release ${{ github.ref_name }} | |
body: | | |
Release for ${{ matrix.os }} ${{ matrix.arch }} with Node.js ${{ matrix.node }} | |
draft: false | |
prerelease: false | |
allowUpdates: true |