Fix update_readme actions to use main branch to avoid auto-push from … #30
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 for Desktop & Draft Release | |
on: | |
push: | |
branches: [main] | |
# Allow running this workflow manually from the Actions tab | |
workflow_dispatch: | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
permissions: | |
contents: write # for creating release draft | |
jobs: | |
build: | |
name: Build & Draft Release | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
node-version: [latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Build for Desktop | |
run: npm run build:desktop | |
env: | |
NEXT_PUBLIC_SUPABASE_PROJECT_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_PROJECT_URL }} | |
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }} | |
- if: startsWith(matrix.os, 'ubuntu') | |
name: Pack for Linux | |
run: | | |
sudo apt-get install -y rpm | |
sudo snap install snapcraft --classic | |
npm exec electron-builder build --linux --x64 --publish=always | |
- if: startsWith(matrix.os, 'windows') | |
name: Pack for Windows | |
run: npm exec electron-builder build --win --x64 --arm64 --publish=always | |
- if: startsWith(matrix.os, 'macos') | |
name: Pack for macOS | |
run: npm exec electron-builder build --mac --x64 --universal --publish=always |