v0.6.15 #53
Workflow file for this run
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: Release Electron | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| jobs: | |
| release: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [macos-latest, ubuntu-latest, windows-latest] | |
| node-version: [22.x] | |
| env: | |
| SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_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_KEY_ISSUER }} | |
| defaults: | |
| run: | |
| working-directory: ./cider-app | |
| steps: | |
| - name: Check out Git repository | |
| uses: actions/checkout@v3 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v1 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| # - name: Install Snapcraft | |
| # uses: oatear/action-snapcraft@v1 | |
| # if: startsWith(matrix.os, 'ubuntu') | |
| - name: Prepare for app notarization (macOS) | |
| if: startsWith(matrix.os, 'macos') | |
| # Import Apple API key for app notarization on macOS | |
| run: | | |
| mkdir -p ~/private_keys/ | |
| echo '${{ secrets.APPLE_API_KEY }}' > ~/private_keys/AuthKey_${{ secrets.APPLE_API_KEY_ID }}.p8 | |
| - name: Restore Provisioning Profile (macOS) | |
| if: startsWith(matrix.os, 'macos') | |
| # This step decodes the base64 secret into the provisioning profile file | |
| # that electron-builder expects for the Mac App Store build. | |
| run: | | |
| # The working-directory is ./cider-app, so we need to create the build folder there | |
| mkdir -p build/ | |
| echo "${{ secrets.MAS_PROVISIONING_PROFILE }}" | base64 --decode > build/cider.provisionprofile | |
| # Make sure the output path 'build/cider.provisionprofile' matches what's | |
| # in your electron-builder.json's "mas" -> "provisioningProfile" key. | |
| - name: Build/release Electron app | |
| uses: oatear/action-electron-builder@v1.0.1 | |
| with: | |
| # GitHub token, automatically provided to the action | |
| # (No need to define this secret in the repo settings) | |
| github_token: ${{ secrets.github_token }} | |
| # Mac certificates and password | |
| mac_certs: ${{ secrets.MAC_CERTS }} | |
| mac_certs_password: ${{ secrets.MAC_CERTS_PASSWORD }} | |
| # Windows certificate and password | |
| #win_certs: ${{ secrets.WIN_CERTS }} | |
| #win_certs_password: ${{ secrets.WIN_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') }} | |
| # set the directory where npm will run | |
| package_root: ./cider-app | |
| build_script_name: electron:compile |