1.14.2 #176
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: Electron Forge CI/CD | |
on: | |
push: | |
tags: | |
- '*' | |
branches: | |
- main | |
- develop | |
pull_request: | |
branches: [main, develop] | |
merge_group: | |
jobs: | |
build-and-test: | |
runs-on: ${{ matrix.os }} | |
env: | |
CI: true | |
strategy: | |
matrix: | |
# , macos-latest | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
run_install: false | |
- name: Use Node.js 22.5.1 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22.5.1' | |
cache: 'pnpm' | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: pnpm install | |
- name: logs | |
run: ls node_modules/@lydell | |
- name: Install dependencies | |
run: pnpm install -f | |
- name: logs | |
run: ls node_modules/@lydell | |
- name: Package application | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SUPABASE_URL: ${{ secrets.SUPABASE_URL }} | |
SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }} | |
SUPABASE_PROJECT_ID: ${{ secrets.SUPABASE_PROJECT_ID }} | |
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }} | |
run: pnpm electron-forge publish --dry-run | |
- name: Disable AppArmor restriction | |
if: matrix.os == 'ubuntu-latest' | |
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 | |
- name: Run tests | |
uses: coactions/setup-xvfb@v1 | |
# continue-on-error: true | |
with: | |
run: pnpm test:e2e:raw | |
- name: Upload Playwright artifacts | |
# continue-on-error: true | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.os }}-playwright | |
path: playwright/**/* | |
- name: Upload artifacts | |
if: success() | |
# continue-on-error: true | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.os }}-out | |
path: out/**/* | |
release: | |
permissions: | |
contents: write | |
discussions: write | |
needs: build-and-test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# , macos-latest | |
os: [ubuntu-latest, windows-latest] | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ matrix.os }}-out | |
path: out | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
run_install: false | |
- name: Use Node.js 22.5.1 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22.5.1' | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install --prod=false | |
- name: Publish release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: pnpm electron-forge publish --from-dry-run |