Fix SSDT-GPIO build failure on old office laptops (v3.0.3) #102
Workflow file for this run
This file contains hidden or 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: Build & Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: 'Release tag (e.g. v2.1.3-beta)' | |
| required: true | |
| default: 'v2.3.0' | |
| jobs: | |
| verify: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - run: npm ci | |
| - name: Verify renderer types | |
| run: npm run lint | |
| - name: Verify Electron types | |
| run: npx tsc -p electron/tsconfig.json --noEmit | |
| - name: Run tests | |
| run: npm test | |
| - name: Build application bundles | |
| run: npm run build | |
| build-linux: | |
| needs: verify | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - run: npm ci | |
| - name: Install Linux build dependencies | |
| run: sudo apt-get install -y rpm fakeroot dpkg | |
| - name: Build application bundles | |
| run: npm run build | |
| - name: Package Linux targets | |
| run: npx electron-builder --linux AppImage deb --x64 --publish never | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: linux-packages | |
| path: | | |
| release/*.AppImage | |
| release/*.deb | |
| build-windows: | |
| needs: verify | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - run: npm ci | |
| - name: Build application bundles | |
| run: npm run build | |
| - name: Package Windows | |
| run: npx electron-builder --win nsis --x64 --publish never | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: windows-installer | |
| path: release/*.exe | |
| publish-release: | |
| needs: [build-linux, build-windows] | |
| if: needs.build-linux.result == 'success' && needs.build-windows.result == 'success' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| path: release-artifacts | |
| merge-multiple: true | |
| - name: Resolve tag name | |
| id: tag | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| echo "name=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT | |
| else | |
| echo "name=${{ github.ref_name }}" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Create GitHub Release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| tag="${{ steps.tag.outputs.name }}" | |
| mapfile -t files < <(find release-artifacts -type f | sort) | |
| if [ "${#files[@]}" -eq 0 ]; then | |
| echo "No release artifacts found." | |
| exit 1 | |
| fi | |
| gh release delete "$tag" --repo "$GITHUB_REPOSITORY" --yes 2>/dev/null || true | |
| gh release create "$tag" "${files[@]}" \ | |
| --repo "$GITHUB_REPOSITORY" \ | |
| --title "$tag" \ | |
| --latest |