0.12.0 #68
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: 'Build' | |
on: | |
push: | |
tags: | |
- 'v*' | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- platform: ubuntu-22.04 | |
target: x86_64-unknown-linux-gnu | |
bundles: appimage,deb | |
- platform: macos-latest | |
target: x86_64-apple-darwin | |
bundles: app,dmg | |
- platform: macos-latest | |
target: aarch64-apple-darwin | |
bundles: app,dmg | |
- platform: windows-latest | |
target: x86_64-pc-windows-msvc | |
bundles: msi | |
runs-on: ${{ matrix.platform }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
outputs: | |
RELEASE_VERSION: ${{ steps.tauri-build.outputs.RELEASE_VERSION }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: 9 | |
run_install: true | |
- name: install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} | |
- name: install dependencies (ubuntu only) | |
if: matrix.platform == 'ubuntu-22.04' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | |
- name: tauri build | |
id: tauri-build | |
env: | |
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} | |
shell: bash | |
run: | | |
pnpm tauri build --ci --target ${{ matrix.target }} --bundles ${{ matrix.bundles }},updater | |
echo "RELEASE_VERSION=v$(pnpm pkg get version | tr -d \")" >> $GITHUB_OUTPUT | |
- name: set filenames | |
shell: bash | |
run: | | |
mkdir artifacts | |
cp src-tauri/target/x86_64-apple-darwin/release/bundle/dmg/*.dmg artifacts/Lichess-Broadcaster-macos-intel.dmg || true | |
cp src-tauri/target/x86_64-apple-darwin/release/bundle/macos/*.app.tar.gz artifacts/Lichess-Broadcaster-macos-intel.app.tar.gz || true | |
cp src-tauri/target/x86_64-apple-darwin/release/bundle/macos/*.app.tar.gz.sig artifacts/Lichess-Broadcaster-macos-intel.app.tar.gz.sig || true | |
cp src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/*.dmg artifacts/Lichess-Broadcaster-macos-silicon.dmg || true | |
cp src-tauri/target/aarch64-apple-darwin/release/bundle/macos/*.app.tar.gz artifacts/Lichess-Broadcaster-macos-silicon.app.tar.gz || true | |
cp src-tauri/target/aarch64-apple-darwin/release/bundle/macos/*.app.tar.gz.sig artifacts/Lichess-Broadcaster-macos-silicon.app.tar.gz.sig || true | |
cp src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/appimage/*.AppImage artifacts/Lichess-Broadcaster-linux.AppImage || true | |
cp src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/appimage/*.AppImage.tar.gz artifacts/Lichess-Broadcaster-linux.AppImage.tar.gz || true | |
cp src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/appimage/*.AppImage.tar.gz.sig artifacts/Lichess-Broadcaster-linux.AppImage.tar.gz.sig || true | |
cp src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/deb/*.deb artifacts/Lichess-Broadcaster-linux.deb || true | |
cp src-tauri/target/x86_64-pc-windows-msvc/release/bundle/msi/*.msi artifacts/Lichess-Broadcaster-windows.msi || true | |
- name: upload artifact (windows unsigned msi) | |
uses: actions/upload-artifact@v4 | |
if: matrix.platform == 'windows-latest' | |
with: | |
name: windows-unsigned-msi | |
path: artifacts/Lichess-Broadcaster-windows.msi | |
- name: code signing (windows) | |
id: code-signing | |
if: matrix.platform == 'windows-latest' | |
uses: signpath/[email protected] | |
with: | |
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}' | |
organization-id: '5f88bd6d-9f02-4053-af25-77474c4957e8' | |
project-slug: 'broadcaster' | |
signing-policy-slug: 'release-signing' | |
github-artifact-name: 'windows-unsigned-msi' | |
wait-for-completion: true | |
output-artifact-directory: 'artifacts' | |
- name: generate updater signature (windows) | |
if: matrix.platform == 'windows-latest' | |
shell: bash | |
run: pnpm tauri signer sign --private-key "${{ secrets.TAURI_PRIVATE_KEY }}" --password "${{ secrets.TAURI_PRIVATE_KEY_PASSWORD }}" artifacts/Lichess-Broadcaster-windows.msi | |
- name: upload release artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: release-${{ matrix.platform }}-${{ matrix.target}} | |
path: artifacts | |
publish: | |
needs: build | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: geekyeggo/delete-artifact@v5 | |
with: | |
name: windows-unsigned-msi | |
- name: download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: artifacts | |
- name: prepare the release files | |
run: | | |
mkdir release-files | |
find artifacts -type f -exec mv {} release-files \; | |
- name: publish release (if not exists) | |
run: | | |
gh release view ${{ needs.build.outputs.RELEASE_VERSION }} || \ | |
gh release create ${{ needs.build.outputs.RELEASE_VERSION }} \ | |
--title "${{ needs.build.outputs.RELEASE_VERSION }}" \ | |
--notes "See the assets to download this version and install." \ | |
--verify-tag \ | |
--latest \ | |
release-files/* |