Files
gemini-nexus/.github/workflows/publish.yaml
T

82 lines
2.3 KiB
YAML

name: Publish Release
on:
release:
types: [published]
workflow_dispatch:
jobs:
publish:
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
platform: win32
arch: x64
- os: windows-11-arm
platform: win32
arch: arm64
- os: macos-15-intel
platform: darwin
arch: x64
- os: macos-14
platform: darwin
arch: arm64
- os: macos-14
platform: darwin
arch: universal
- os: ubuntu-latest
platform: linux
arch: x64
- os: ubuntu-24.04-arm
platform: linux
arch: arm64
runs-on: ${{ matrix.os }}
permissions:
contents: write
steps:
- name: Checkout git repo
uses: actions/checkout@v4
- name: Install Node and NPM
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install Linux dependencies
if: matrix.platform == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y fakeroot rpm libsecret-1-dev pkg-config
- name: Ensure WiX Toolset
if: matrix.platform == 'win32' && matrix.arch == 'x64'
shell: powershell
run: |
$installed = choco list --local-only wixtoolset --exact --limit-output
if (-not $installed) {
choco install wixtoolset --version=3.14.0 -y
} elseif ($installed -match '^wixtoolset\|3\.14(\.|$)') {
Write-Host "WiX Toolset already compatible: $installed"
} else {
Write-Host "Incompatible WiX Toolset detected: $installed"
choco upgrade wixtoolset --version=3.14.0 --allow-downgrade -y
}
- name: Install dependencies
run: npm ci
- name: Publish Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
run: npm run publish -- --platform=${{ matrix.platform }} --arch=${{ matrix.arch }}