mirror of
https://github.com/jimeh/emacs-builds.git
synced 2026-02-19 08:26:40 +00:00
This should help reduce costs for Apple Silicon builds, as they are not available on any form of free tier of GitHub Actions at the moment. The build step that actually runs Emacs' configure script, and compiles Emacs, is the only step that actually needs to run on the target hardware architecture. The rest should be architecture agnostic.
67 lines
2.2 KiB
YAML
67 lines
2.2 KiB
YAML
---
|
|
# Requires _prepare.yml and _build.yml re-usable workflows to have run.
|
|
name: _release
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
os:
|
|
description: GitHub Actions runner OS
|
|
type: string
|
|
required: false
|
|
default: "macos-11"
|
|
plan_artifact:
|
|
description: Name of artifact containing a emacs-builder plan yaml file
|
|
type: string
|
|
required: true
|
|
dmg_artifact:
|
|
description: Name of artifact containing a *.dmg files to release
|
|
type: string
|
|
required: true
|
|
test_build_name:
|
|
description: "Test build name"
|
|
type: string
|
|
required: false
|
|
secrets:
|
|
TAP_REPO_TOKEN:
|
|
description: Personal Access Token for Homebrew Tap repo
|
|
required: true
|
|
|
|
jobs:
|
|
github:
|
|
runs-on: ${{ inputs.os }}
|
|
steps:
|
|
- name: Download pre-built emacs-builder artifact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: emacs-builder
|
|
path: bin
|
|
- name: Ensure emacs-builder is executable
|
|
run: chmod +x bin/emacs-builder
|
|
- name: Download build-plan.yml artifact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: ${{ inputs.plan_artifact }}
|
|
path: ./
|
|
- name: Download disk image artifacts
|
|
id: dmg
|
|
continue-on-error: true
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: ${{ inputs.dmg_artifact }}
|
|
path: builds
|
|
- name: Publish disk images to a GitHub Release
|
|
if: ${{ steps.dmg.outputs.result != 'fail' }}
|
|
run: >-
|
|
bin/emacs-builder -l debug release --plan build-plan.yml publish
|
|
$(find builds -name '*.dmg' -or -name '*.sha256')
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Trigger update casks workflow in homebrew tap
|
|
if: ${{ steps.dmg.outputs.result != 'fail' && inputs.test_build_name == '' }}
|
|
run: >-
|
|
gh workflow run --repo jimeh/homebrew-emacs-builds update-casks.yml
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.TAP_REPO_TOKEN }}
|
|
- run: echo 'No DMG artifact available, was there a new commit to build?'
|
|
if: ${{ steps.dmg.outputs.result == 'fail' }}
|