mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-08 08:53:51 +00:00
c7d8b137ca
* chore: only run release action if we have a tag * chore: typescript 6 is out of beta * chore: update flaky test * chore: update pnpm * chore: update playwright and node types * chore: migrate tsup to tsdown * chore: update node to node 22.22.2(LTS) * chore: fix lockfile --------- Co-authored-by: alex-Arc <omnivox@LAPTOP-RC5SNBVV.localdomain>
146 lines
3.9 KiB
YAML
146 lines
3.9 KiB
YAML
name: Ontime build
|
|
|
|
on:
|
|
push:
|
|
tags: ['*']
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build_macos:
|
|
runs-on: macOS-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v4
|
|
|
|
- name: Get pnpm store directory
|
|
run: echo "PNPM_STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
|
|
|
- name: Setup pnpm cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ${{ env.PNPM_STORE_PATH }}
|
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pnpm-store-
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Build project packages
|
|
env:
|
|
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
|
run: pnpm build
|
|
|
|
- name: Electron - Build app
|
|
env:
|
|
APPLE_ID: ${{ secrets.APPLEID }}
|
|
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLEIDPASS }}
|
|
APPLE_TEAM_ID: ${{ secrets.TEAMID }}
|
|
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
|
|
CSC_LINK: ${{ secrets.CSC_LINK }}
|
|
run: pnpm dist-mac --env-mode=loose
|
|
timeout-minutes: 60
|
|
|
|
- name: Upload macOS build artifacts
|
|
uses: actions/upload-artifact@v4
|
|
if: always()
|
|
with:
|
|
name: ontime-macos-build
|
|
path: |
|
|
./apps/electron/dist/ontime-macOS-x64.dmg
|
|
./apps/electron/dist/ontime-macOS-arm64.dmg
|
|
retention-days: 1
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
if: github.ref_type == 'tag'
|
|
with:
|
|
files: |
|
|
./apps/electron/dist/ontime-macOS-x64.dmg
|
|
./apps/electron/dist/ontime-macOS-arm64.dmg
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
build_windows:
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v3
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Build project packages
|
|
env:
|
|
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
|
run: pnpm build
|
|
|
|
- name: Electron - Build app
|
|
run: pnpm dist-win
|
|
|
|
- name: Upload Windows build artifacts
|
|
uses: actions/upload-artifact@v4
|
|
if: always()
|
|
with:
|
|
name: ontime-windows-build
|
|
path: |
|
|
./apps/electron/dist/ontime-win64.exe
|
|
./apps/electron/dist/win-unpacked/
|
|
retention-days: 1
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
if: github.ref_type == 'tag'
|
|
with:
|
|
files: './apps/electron/dist/ontime-win64.exe'
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
build_ubuntu:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v3
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Build project packages
|
|
env:
|
|
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
|
run: pnpm build
|
|
|
|
- name: Electron - Build app
|
|
run: pnpm dist-linux
|
|
|
|
- name: Upload Linux build artifacts
|
|
uses: actions/upload-artifact@v4
|
|
if: always()
|
|
with:
|
|
name: ontime-linux-build
|
|
path: |
|
|
./apps/electron/dist/ontime-linux-x86_64.AppImage
|
|
./apps/electron/dist/ontime-linux-arm64.AppImage
|
|
./apps/electron/dist/ontime-linux-armv7l.AppImage
|
|
retention-days: 1
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
if: github.ref_type == 'tag'
|
|
with:
|
|
files: |
|
|
./apps/electron/dist/ontime-linux-x86_64.AppImage
|
|
./apps/electron/dist/ontime-linux-arm64.AppImage
|
|
./apps/electron/dist/ontime-linux-armv7l.AppImage
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|