Update README.md #21
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: Build and Release | |
on: | |
pull_request: | |
branches: [main] | |
push: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Use Node 18 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build Desktop App | |
working-directory: packages/desktop | |
run: | | |
pnpm ts:check | |
pnpm build | |
release: | |
if: ${{ github.event_name == 'push' }} | |
needs: [build] | |
runs-on: macos-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Use Node 18 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build and Release DMG | |
working-directory: packages/desktop | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
pnpm build:electron --publish always | |
- name: Upload DMG Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: HyprSqrl-DMG | |
path: packages/desktop/release/*.dmg |