/ .github / workflows / build-artifacts.yml
build-artifacts.yml
 1  name: Build Artifacts
 2  
 3  on:
 4    workflow_dispatch:
 5  
 6  jobs:
 7    build:
 8      name: Build ${{ matrix.os }}
 9      strategy:
10        matrix:
11          os: [ubuntu-latest, windows-latest, macos-latest]
12      runs-on: ${{ matrix.os }}
13  
14      steps:
15        - name: Checkout repository
16          uses: actions/checkout@v4
17  
18        - name: Set up Node.js
19          uses: actions/setup-node@v4
20          with:
21            node-version: "22"
22  
23        - name: Install dependencies
24          run: npm install
25  
26        - name: Build project
27          run: npm run build:${{ fromJson('{"ubuntu-latest":"linux","macos-latest":"mac","windows-latest":"win"}')[matrix.os] }}
28          env:
29            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30  
31        - name: Archive production artifacts
32          uses: actions/upload-artifact@v4
33          with:
34            name: build-artifacts-${{ matrix.os }}
35            path: |
36              release/*/*.exe
37              release/*/*.appx
38              release/*/*.zip
39              release/*/*.deb
40              release/*/*.rpm
41              release/*/*.snap
42              release/*/*.dmg
43            retention-days: 3
44            compression-level: 0