Working auth with new UI (#372) #304
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: | |
branches: | |
- "main" | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
paths-ignore: | |
- "**.md" | |
- "**.spec.js" | |
- ".idea" | |
- ".vscode" | |
- ".dockerignore" | |
- "Dockerfile" | |
- ".gitignore" | |
- ".github/**" | |
- "!.github/workflows/build.yml" | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
permissions: | |
contents: write | |
strategy: | |
matrix: | |
os: | |
- macos-latest | |
- windows-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Set Mac API Key | |
if: startsWith(matrix.os, 'macos') | |
run: | | |
mkdir -p ~/private_keys/ | |
echo '${{ secrets.APPLE_API_KEY_CONTENT }}' > ~/private_keys/AuthKey_${{ secrets.APPLE_API_KEY_ID }}.p8 | |
- name: Install dependencies | |
working-directory: app | |
run: npm install | |
- name: Set environment variables | |
working-directory: app | |
run: | | |
{ | |
echo "VITE_SUPABASE_API_URL=${{ secrets.SUPABASE_API_URL }}" | |
echo "VITE_SUPABASE_ANON_KEY=${{ secrets.SUPABASE_ANON_KEY }}" | |
echo "VITE_MIXPANEL_TOKEN=${{ secrets.MIXPANEL_TOKEN }}" | |
} > .env | |
- name: Build/release Electron app | |
uses: samuelmeuli/action-electron-builder@v1 | |
with: | |
package_root: app | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
release: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
mac_certs: ${{ secrets.MAC_CERTS }} | |
mac_certs_password: ${{ secrets.MAC_CERTS_PASSWORD }} | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
APPLE_API_KEY: ~/private_keys/AuthKey_${{ secrets.APPLE_API_KEY_ID }}.p8 | |
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }} | |
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }} |