project-client/.github/workflows/release.yml

59 lines
1.8 KiB
YAML
Raw Normal View History

2023-04-06 03:14:28 +00:00
name: Release
2023-04-03 23:58:24 +00:00
2023-04-06 03:14:28 +00:00
on:
2023-04-10 17:38:32 +00:00
push:
tags:
- v*
2024-04-26 19:36:47 +00:00
workflow_dispatch:
2023-04-03 23:58:24 +00:00
jobs:
2023-04-10 17:38:32 +00:00
release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
2023-12-02 16:52:13 +00:00
include:
- os: macos-latest
platform: mac
- os: ubuntu-latest
platform: linux
- os: windows-latest
platform: windows
2023-04-10 17:38:32 +00:00
steps:
2024-07-04 15:46:41 +00:00
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4 # Install pnpm using packageManager key in package.json
2023-04-10 17:38:32 +00:00
2024-07-04 15:46:41 +00:00
- name: Use Node.js 20
uses: actions/setup-node@v4
2023-04-10 17:38:32 +00:00
with:
2024-07-04 15:46:41 +00:00
node-version: 20
2023-12-02 16:44:52 +00:00
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm build
2023-04-10 17:38:32 +00:00
- name: Run Electron Builder
2024-01-16 00:41:15 +00:00
if: ${{ matrix.platform != 'mac' }}
2023-12-02 16:41:38 +00:00
run: |
2023-12-02 16:52:13 +00:00
pnpm electron-builder --${{ matrix.platform }} --publish always
2023-12-02 16:41:38 +00:00
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2024-07-04 15:46:41 +00:00
2024-01-16 00:41:15 +00:00
- name: Run Electron Builder
if: ${{ matrix.platform == 'mac' }}
run: |
2024-07-23 14:10:50 +00:00
echo "$API_KEY" > apple.p8
2024-01-16 00:41:15 +00:00
pnpm electron-builder --${{ matrix.platform }} --publish always
env:
2024-07-23 14:10:50 +00:00
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CSC_LINK: ${{ secrets.APPLE_SIGNING_CERT }}
API_KEY: ${{ secrets.APPLE_API_KEY }}
APPLE_API_KEY: apple.p8
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}