Replace all contexts and providers with zustand stores #174
This file contains hidden or 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/Release | |
| on: push | |
| jobs: | |
| build-release: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [macos-latest] | |
| steps: | |
| - name: Check out Git repository | |
| uses: actions/checkout@v1 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.9 | |
| - name: Install backend dependencies | |
| id: install-backend-deps | |
| run: | | |
| cd backend | |
| pip install build | |
| pip install -U -r requirements.txt | |
| - name: Install Node.js, NPM and Yarn | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| - name: Install frontend dependencies | |
| id: install-frontend-deps | |
| run: | | |
| cd electron | |
| npm i --yes | |
| - name: Create backend env.py | |
| id: create-backend-env | |
| run: | | |
| cd backend | |
| touch env.py | |
| echo "import os" >> env.py | |
| echo 'os.environ["STORAGE_KEY"] = "${{ secrets.STORAGE_KEY }}"' >> env.py | |
| echo 'os.environ["SUPABASE_URL"] = "${{ secrets.SUPABASE_URL }}"' >> env.py | |
| echo 'os.environ["SUPABASE_KEY"] = "${{ secrets.SUPABASE_KEY }}"' >> env.py | |
| - name: Build backend executable | |
| id: build-backend | |
| run: npm run build-backend | |
| - name: Prepare for app notarization | |
| if: startsWith(matrix.os, 'macos') | |
| # Import Apple API key for app notarization on macOS | |
| run: | | |
| mkdir -p ~/private_keys/ | |
| echo "${{ secrets.MAC_API_KEY }}" > ~/private_keys/AuthKey_${{ secrets.MAC_API_KEY_ID }}.p8 | |
| - name: Build/release Electron app | |
| uses: codeofandrin/action-electron-builder@master | |
| with: | |
| package_root: ./electron | |
| build_script_name: prebuild | |
| skip_sign: ${{ !(startsWith(github.ref, 'refs/tags/v')) }} | |
| # GitHub tokens | |
| github_token: ${{ secrets.GH_TOKEN }} | |
| # macOS code signing certificate | |
| mac_certs: ${{ secrets.MAC_CERTS }} | |
| mac_certs_password: ${{ secrets.MAC_CERTS_PASSWORD }} | |
| # If the commit is tagged with a version (e.g. "v1.0.0"), | |
| # release the app after building | |
| release: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
| env: | |
| # macOS Notarization | |
| MAC_API_KEY_ID: ${{ secrets.MAC_API_KEY_ID }} | |
| MAC_API_KEY_ISSUER_ID: ${{ secrets.MAC_API_KEY_ISSUER_ID }} | |
| SKIP_NOTARIZE: ${{ !(startsWith(github.ref, 'refs/tags/v')) }} |