mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-11 20:08:37 +00:00
75 lines
1.8 KiB
YAML
75 lines
1.8 KiB
YAML
name: Release App
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*.*.*'
|
|
paths-ignore:
|
|
- 'README.md'
|
|
- 'docs/**'
|
|
- '.vscode'
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
- 'README.md'
|
|
- '.vscode'
|
|
|
|
concurrency:
|
|
group: release-ci-group
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
MacOS:
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: 'true'
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18.x
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v2
|
|
with:
|
|
version: latest
|
|
- name: Get pnpm store directory
|
|
id: pnpm-cache
|
|
shell: bash
|
|
run: |
|
|
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
|
|
- name: Get npm cache directory
|
|
uses: actions/cache@v3
|
|
id: cache
|
|
with:
|
|
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
|
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pnpm-store-
|
|
|
|
- name: Install dependencies
|
|
run: pnpm i -r
|
|
|
|
- name: Make macOS (x64)
|
|
run: pnpm build:app
|
|
working-directory: apps/desktop
|
|
env:
|
|
CI: true
|
|
CI_PULL_REQUEST: ${{ github.event_name == 'pull_request' }}
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Create Release
|
|
uses: softprops/action-gh-release@v1
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
draft: true
|
|
generate_release_notes: true
|
|
files: apps/desktop/src-tauri/target/release/bundle/dmg/*.dmg
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|