2024-02-18 18:16:05 +00:00
|
|
|
#
|
|
|
|
# .github/workflows/release.yml
|
|
|
|
#
|
2024-02-18 19:13:42 +00:00
|
|
|
---
|
2024-02-18 18:16:05 +00:00
|
|
|
name: release
|
|
|
|
on:
|
2024-02-18 21:09:23 +00:00
|
|
|
push:
|
2024-03-09 18:27:13 +00:00
|
|
|
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release
|
2024-02-18 18:16:05 +00:00
|
|
|
release:
|
|
|
|
types: [published]
|
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
runs-on: macos-14
|
|
|
|
steps:
|
2024-03-09 18:27:13 +00:00
|
|
|
|
|
|
|
- run: |
|
|
|
|
echo "release event"
|
|
|
|
echo "Name: ${{ github.event.release.name }}"
|
|
|
|
echo "Description: ${{ github.event.release.body }}"
|
|
|
|
|
2024-02-18 19:13:42 +00:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
# A fetch-depth of 0 includes all history and tags for script/version
|
|
|
|
fetch-depth: 0
|
2024-02-19 03:14:31 +00:00
|
|
|
- name: 👢 Bootstrap
|
2024-02-18 19:13:42 +00:00
|
|
|
run: script/bootstrap
|
2024-02-19 02:45:04 +00:00
|
|
|
|
|
|
|
# Important to trigger a universal build first as package just works with
|
|
|
|
# the `mas` binary in finds in the build dir.
|
2024-02-19 03:14:31 +00:00
|
|
|
- name: 🏗️ Build Universal
|
2024-02-19 02:45:04 +00:00
|
|
|
run: script/build --universal
|
2024-02-19 03:14:31 +00:00
|
|
|
- name: 📦 macOS Package
|
2024-02-19 02:45:04 +00:00
|
|
|
run: script/package
|
2024-02-19 03:14:31 +00:00
|
|
|
- name: 🚀 Upload mas.pkg
|
2024-02-19 02:45:04 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
if-no-files-found: error
|
|
|
|
name: mas.pkg
|
|
|
|
path: .build/mas.pkg
|
|
|
|
|
2024-02-19 03:14:31 +00:00
|
|
|
- name: 🍼 Homebrew Bottles for mas tap
|
|
|
|
run: script/bottle
|
|
|
|
- name: 🚀 Upload Bottles
|
2024-02-19 03:10:04 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
if-no-files-found: error
|
|
|
|
name: homebrew-bottles
|
|
|
|
path: |
|
|
|
|
.build/bottles/mas-*.bottle.tar.gz
|
2024-03-09 17:36:03 +00:00
|
|
|
|
|
|
|
- name: 🍺 Update Homebrew mas formula
|
|
|
|
run: script/brew_formula_update
|