feat: improved classificaiton #82
This file contains 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: CI/CD | |
on: | |
pull_request: | |
branches: [main] | |
push: | |
branches: [main] | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: 8 | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- name: Setup pnpm cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: pnpm install | |
- name: Type Check | |
working-directory: packages/desktop | |
run: pnpm ts:check | |
- name: Build Desktop App | |
working-directory: packages/desktop | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
run: | | |
if [[ $GITHUB_REF == refs/tags/* ]]; then | |
pnpm build:electron --publish always | |
else | |
pnpm build | |
fi | |
- name: Upload DMG Artifact | |
uses: actions/upload-artifact@v4 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
name: HyprSqrl-DMG | |
path: | | |
packages/desktop/release/*.dmg | |
packages/desktop/release/*.zip | |
packages/desktop/release/*.blockmap | |
- name: Create Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
draft: true | |
files: | | |
packages/desktop/release/*.dmg | |
packages/desktop/release/*.zip | |
packages/desktop/release/*.blockmap | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} |