Create Desktop Release #54
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: Create Desktop Release | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: "Bump version" | |
required: true | |
default: "patch" | |
jobs: | |
validate: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "18" | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9.2.0 | |
- name: Install packages | |
run: pnpm install --prefer-offline | |
- name: Install browsers | |
run: pnpm --filter @painting-droid/web test:e2e:install-browsers | |
- name: Run unit tests, typescript checks and linting | |
run: pnpm validate | |
- name: Run e2e tests | |
run: pnpm --filter @painting-droid/web test:e2e | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-report | |
path: apps/web/playwright-report/ | |
retention-days: 30 | |
publish: | |
needs: validate | |
permissions: | |
contents: write | |
strategy: | |
fail-fast: false | |
matrix: | |
settings: | |
- platform: "macos-latest" | |
args: "--target aarch64-apple-darwin" | |
- platform: "macos-latest" | |
args: "--target x86_64-apple-darwin" | |
- platform: "ubuntu-22.04" | |
args: "" | |
- platform: "windows-latest" | |
args: "" | |
runs-on: ${{ matrix.settings.platform }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Bump version | |
run: | | |
echo "new_version=$(npm version --commit-hooks false --git-tag-version false ${{ github.event.inputs.version }})" >> $GITHUB_ENV | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "18" | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9.2.0 | |
- name: Install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: ${{ matrix.settings.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} | |
- name: Install Linux dependencies | |
if: matrix.settings.platform == 'ubuntu-22.04' # This must match the platform value defined above. | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | |
- name: Install packages | |
run: pnpm install --prefer-offline | |
- uses: tauri-apps/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} | |
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} | |
APPLE_ID: ${{ secrets.APPLE_ID }} | |
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | |
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} | |
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} | |
with: | |
projectPath: apps/desktop | |
includeUpdaterJson: true | |
tagName: app-v__VERSION__ | |
releaseName: "App v__VERSION__" | |
releaseBody: "See the assets to download this version and install." | |
releaseDraft: true | |
prerelease: false | |
args: ${{ matrix.settings.args }} | |
# update-version: | |
# needs: publish | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Checkout repository | |
# uses: actions/checkout@v4 | |
# - name: Bump version | |
# run: | | |
# echo "new_version=$(npm version --commit-hooks false --git-tag-version false ${{ github.event.inputs.version }})" >> $GITHUB_ENV | |
# - name: Commit version | |
# run: | | |
# git config --global user.email "[email protected]" | |
# git config --global user.name "github-actions" | |
# git add . | |
# git commit -m "Bump version to ${{ env.new_version }}" | |
# git push |