The release workflow moves from .gitea to .github: macOS on the macos-signing runner, Windows and Linux (WSL) on ely-windows. The persistent clones fetch from GitHub. ci.sh creates or reuses the tag's release through GitHub's API and replaces a rerun's assets of the same name; the update manifests point at GitHub's download URLs. Co-Authored-By: Claude <noreply@anthropic.com>
70 lines
3.0 KiB
YAML
70 lines
3.0 KiB
YAML
# A tag builds, packages and uploads all three platforms.
|
|
# Tags only: no pull request ever reaches the self-hosted runners.
|
|
name: release
|
|
on:
|
|
push:
|
|
tags: ['v*']
|
|
permissions:
|
|
contents: write
|
|
jobs:
|
|
macos:
|
|
# A GUI-session agent: daemons see no login keychain.
|
|
runs-on: [self-hosted, macos-signing]
|
|
timeout-minutes: 720
|
|
steps:
|
|
- name: Build, package and upload for macOS
|
|
shell: bash
|
|
env:
|
|
ELY_RELEASE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
# The dev clone's engines: LibreOffice from scratch outlasts the runner.
|
|
ELY_SHARE: /Users/zacharyzhang/Documents/GitHub/ElyOfficeSuite
|
|
ELY_PATH: /Users/zacharyzhang/.cargo/bin:/opt/homebrew/bin
|
|
# Repository variables; both live in the runner's keychain.
|
|
ELY_SIGN_IDENTITY: ${{ vars.ELY_SIGN_IDENTITY }}
|
|
ELY_NOTARY_PROFILE: ${{ vars.ELY_NOTARY_PROFILE }}
|
|
run: |
|
|
dir=$HOME/ely-ci/ElyOffice
|
|
[ -d "$dir/.git" ] || git clone https://github.com/ELY-Open-Source/ElyOffice.git "$dir"
|
|
git -C "$dir" remote set-url origin https://github.com/ELY-Open-Source/ElyOffice.git
|
|
git -C "$dir" fetch --force --tags origin
|
|
git -C "$dir" checkout --force "${{ github.sha }}"
|
|
"$dir/scripts/ci.sh" macos "${{ github.ref_name }}"
|
|
windows:
|
|
runs-on: [self-hosted, ely-windows]
|
|
timeout-minutes: 360
|
|
steps:
|
|
- name: Build, package and upload for Windows
|
|
shell: bash
|
|
env:
|
|
ELY_RELEASE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
ELY_SHARE: /c/Users/zhang/Documents/Github/ElyOffice
|
|
ELY_PATH: /c/Program Files/CMake/bin:/c/Users/zhang/AppData/Local/Microsoft/WinGet/Packages/Ninja-build.Ninja_Microsoft.Winget.Source_8wekyb3d8bbwe
|
|
run: |
|
|
dir=$HOME/ely-ci/ElyOffice
|
|
[ -d "$dir/.git" ] || git clone https://github.com/ELY-Open-Source/ElyOffice.git "$dir"
|
|
git -C "$dir" remote set-url origin https://github.com/ELY-Open-Source/ElyOffice.git
|
|
git -C "$dir" fetch --force --tags origin
|
|
git -C "$dir" checkout --force "${{ github.sha }}"
|
|
"$dir/scripts/ci.sh" windows "${{ github.ref_name }}"
|
|
linux:
|
|
# WSL on the Windows runner keeps a built kernel.
|
|
runs-on: [self-hosted, ely-windows]
|
|
needs: windows
|
|
timeout-minutes: 360
|
|
steps:
|
|
- name: Build, package and upload for Linux
|
|
shell: bash
|
|
env:
|
|
ELY_RELEASE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
WSLENV: ELY_RELEASE_TOKEN
|
|
run: |
|
|
wsl -d Ubuntu --exec bash -lc '
|
|
set -euo pipefail
|
|
dir=$HOME/ely-ci/ElyOffice
|
|
[ -d "$dir/.git" ] || git clone https://github.com/ELY-Open-Source/ElyOffice.git "$dir"
|
|
git -C "$dir" remote set-url origin https://github.com/ELY-Open-Source/ElyOffice.git
|
|
git -C "$dir" fetch --force --tags origin
|
|
git -C "$dir" checkout --force "${{ github.sha }}"
|
|
ELY_SHARE=$HOME/Documents/Github/ElyOffice "$dir/scripts/ci.sh" linux "${{ github.ref_name }}"
|
|
'
|