diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 08c8e0cb..5878e727 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -98,34 +98,34 @@ jobs: - name: Frontend dependencies run: pnpm install + - name: Dry run + if: ${{ !startsWith(github.event.ref, 'refs/tags/v') }} + run: pnpm tauri build ${{ matrix.args }} + - name: Save API key to file if: ${{ matrix.platform == 'macos-latest' && startsWith(github.event.ref, 'refs/tags/v') }} run: | mkdir -p ~/private_keys echo -n '${{ secrets.APPLE_API_SECRET_KEY }}' > ~/private_keys/AuthKey_${{ secrets.APPLE_API_KEY_ID }}.p8 - - name: Apple signing variables - if: ${{ matrix.platform == 'macos-latest' && startsWith(github.event.ref, 'refs/tags/v') }} - run: | - echo "APPLE_CERTIFICATE=$APPLE_CERTIFICATE" >> $GITHUB_ENV - echo "APPLE_CERTIFICATE_PASSWORD=$APPLE_CERTIFICATE_PASSWORD" >> $GITHUB_ENV - echo "APPLE_API_ISSUER=$APPLE_API_ISSUER" >> $GITHUB_ENV - echo "APPLE_API_KEY=$APPLE_API_KEY" >> $GITHUB_ENV - echo "APPLE_API_KEY_PATH=$APPLE_API_KEY_PATH" >> $GITHUB_ENV + - name: Publish (MacOS) + uses: tauri-apps/tauri-action@v0 + if: ${{ startsWith(github.event.ref, 'refs/tags/v') && matrix.platform == 'macos-latest' }} env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }} APPLE_API_KEY: ${{ secrets.APPLE_API_KEY_ID }} APPLE_API_KEY_PATH: ~/private_keys/AuthKey_${{ secrets.APPLE_API_KEY_ID }}.p8 - - - name: Dry run - if: ${{ !startsWith(github.event.ref, 'refs/tags/v') }} - run: pnpm tauri build ${{ matrix.args }} + CI: true + with: + releaseId: ${{ steps.get_release.outputs.result }} + args: ${{ matrix.args }} - name: Publish uses: tauri-apps/tauri-action@v0 - if: ${{ startsWith(github.event.ref, 'refs/tags/v') }} + if: ${{ startsWith(github.event.ref, 'refs/tags/v') && matrix.platform != 'macos-latest' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CI: true