59 lines
1.9 KiB
YAML
59 lines
1.9 KiB
YAML
# Builds macOS apps for a release tag and attaches them.
|
|
name: release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
tag:
|
|
description: Release tag to attach the packages to, such as v0.1.0
|
|
required: true
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
macos:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- runner: macos-15
|
|
arch: arm64
|
|
- runner: macos-15-intel
|
|
arch: x86_64
|
|
runs-on: ${{ matrix.runner }}
|
|
timeout-minutes: 120
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ inputs.tag }}
|
|
- name: Engines
|
|
run: |
|
|
brew install zstd
|
|
tag=engines-$(scripts/engines-key.sh)
|
|
gh release download "$tag" --pattern "engines-macos-${{ matrix.arch }}.tar.zst" ||
|
|
{ echo "::error::no $tag for ${{ matrix.arch }}; run the engines workflow first"; exit 1; }
|
|
mkdir -p engines
|
|
zstd -dc "engines-macos-${{ matrix.arch }}.tar.zst" | tar -C engines -xf -
|
|
- name: Upstream sources and ElyMark's page
|
|
run: |
|
|
scripts/fetch-references.sh
|
|
scripts/build-mark-content.sh
|
|
- name: Tests that need no window
|
|
run: |
|
|
tests/scripts/types.sh
|
|
tests/scripts/icons.sh
|
|
python3 tests/scripts/comments.py
|
|
- name: Packages
|
|
run: packaging/macos/release.sh 1
|
|
- name: Attach to the release
|
|
run: |
|
|
version=${{ inputs.tag }}
|
|
gh release view "$version" >/dev/null 2>&1 || gh release create "$version" --title "Ely Office $version" --notes "Built by release.yml."
|
|
gh release upload "$version" dist/*.dmg --clobber
|
|
if [ "${{ matrix.arch }}" = arm64 ]; then
|
|
gh release upload "$version" dist/ElyOffice-*-source.tar.gz dist/ElyOffice-*-upstream-source.tar.gz --clobber
|
|
fi
|