Release #26
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: "Release" | |
# Build the ente-io/ente's desktop/rc branch and create/update a draft release. | |
# | |
# For more details, see `docs/release.md` in ente-io/ente. | |
on: | |
# Trigger manually or `gh workflow run desktop-release.yml --source=foo`. | |
workflow_dispatch: | |
inputs: | |
source: | |
description: "Branch (ente-io/ente) to build" | |
type: string | |
schedule: | |
# Run everyday at ~8:00 AM IST (except Sundays). | |
# See: [Note: Run workflow every 24 hours] | |
# | |
- cron: "45 2 * * 1-6" | |
push: | |
# Run when a tag matching the pattern "v*"" is pushed. | |
tags: | |
- "v*" | |
jobs: | |
release: | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
working-directory: desktop | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
# If triggered by a tag, checkout photosd-$tag from the source | |
# repository. Otherwise checkout $source (default: "main"). | |
repository: ente-io/ente | |
ref: | |
"${{ startsWith(github.ref, 'refs/tags/v') && | |
format('photosd-{0}', github.ref_name) || ( inputs.source | |
|| 'main' ) }}" | |
submodules: recursive | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Increase yarn timeout | |
# `yarn install` times out sometimes on the Windows runner, | |
# resulting in flaky builds. | |
run: yarn config set network-timeout 900000 -g | |
- name: Install dependencies | |
run: yarn install | |
- name: Install libarchive-tools for pacman build | |
if: startsWith(matrix.os, 'ubuntu') | |
# See: | |
# https://github.com/electron-userland/electron-builder/issues/4181 | |
run: sudo apt-get install libarchive-tools | |
- name: Build | |
uses: ente-io/[email protected] | |
with: | |
package_root: desktop | |
build_script_name: build:ci | |
# GitHub token, automatically provided to the action | |
# (No need to define this secret in the repo settings) | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
# If the commit is tagged with a version (e.g. "v1.0.0"), | |
# create a (draft) release after building. Otherwise upload | |
# assets to the existing draft named after the version. | |
release: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
mac_certs: ${{ secrets.MAC_CERTS }} | |
mac_certs_password: ${{ secrets.MAC_CERTS_PASSWORD }} | |
env: | |
# macOS notarization credentials key details | |
APPLE_ID: ${{ secrets.APPLE_ID }} | |
APPLE_APP_SPECIFIC_PASSWORD: | |
${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }} | |
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
USE_HARD_LINKS: false |