mirror of
https://github.com/cpvalente/ontime.git
synced 2026-07-26 10:38:55 +00:00
143 lines
3.8 KiB
YAML
143 lines
3.8 KiB
YAML
name: Ontime build
|
|
|
|
on:
|
|
push:
|
|
tags: ['*']
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build_macos:
|
|
runs-on: macOS-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version-file: '.nvmrc'
|
|
|
|
- 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: 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
|
|
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version-file: '.nvmrc'
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v3
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- 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
|
|
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version-file: '.nvmrc'
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v3
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- 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 }}
|