Skip to content

Commit

Permalink
Refine workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Rigidity committed Sep 22, 2024
1 parent 19ac959 commit c56834f
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c56834f

Please sign in to comment.