v1.8.8-beta.8 #88
Workflow file for this run
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
# | |
# .github/workflows/release.yml | |
# | |
--- | |
name: release | |
defaults: | |
run: | |
# Force all run commands to not use Rosetta 2 | |
shell: arch -arm64 /bin/bash --noprofile --norc -eo pipefail {0} | |
on: | |
release: | |
types: [published] | |
jobs: | |
start: | |
runs-on: macos-15 | |
outputs: | |
dry_run: ${{ steps.dry_run.outputs.dry_run }} | |
mas_version: ${{ steps.mas_version.outputs.mas_version }} | |
pre_release: ${{ steps.pre_release.outputs.pre_release }} | |
steps: | |
- name: 🔈 Log release event | |
# Run only for a real release event | |
if: ${{ github.event.release.name != '' }} | |
run: | | |
echo 'Triggered by a release publication event (wet run)' | |
echo 'release.name: ${{ github.event.release.name }}' | |
echo 'release.tag_name: ${{ github.event.release.tag_name }}' | |
echo 'release.target_commitish: ${{ github.event.release.target_commitish }}' | |
echo $'release.body: \n${{ github.event.release.body }}' | |
- id: dry_run | |
run: | | |
echo DRY_RUN=false >>"${GITHUB_OUTPUT}" | |
- id: mas_version | |
run: | | |
echo 'MAS_VERSION=${{ github.event.release.tag_name }}' >>"${GITHUB_OUTPUT}" | |
- id: pre_release | |
run: | | |
echo "PRE_RELEASE=$(grep -q '-' <<<"{{ github.event.release.tag_name }}" && echo 'true' || echo 'false')" >>"${GITHUB_OUTPUT}" | |
pkg-installer: | |
runs-on: macos-15 | |
needs: start | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Include all history & tags for script/version | |
fetch-depth: 0 | |
ref: ${{ needs.start.outputs.mas_version }} | |
- name: 👢 Bootstrap | |
run: | | |
script/bootstrap -f | |
# Run a universal build to produce mas binary for package | |
- name: 🏗️ Build Universal | |
run: | | |
script/build --universal | |
- name: 📦 macOS Package | |
run: | | |
script/package | |
- name: 🚀 Upload mas.pkg | |
if: ${{ needs.start.outputs.dry_run == 'false' }} | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
gh release upload '${{ needs.start.outputs.mas_version }}' \ | |
.build/mas.pkg | |
homebrew-tap: | |
runs-on: macos-15 | |
needs: start | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Include all history & tags for script/version | |
fetch-depth: 0 | |
ref: ${{ needs.start.outputs.mas_version }} | |
- name: ⤴️ Bump mas tap formula | |
env: | |
DRY_RUN: ${{ needs.start.outputs.dry_run }} | |
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }} | |
run: | | |
brew tap mas-cli/tap | |
brew bump-formula-pr \ | |
--tag '${{ needs.start.outputs.mas_version }}' \ | |
--revision "$(git rev-list -n 1 '${{ needs.start.outputs.mas_version }}')" \ | |
--no-browse \ | |
--no-fork \ | |
--online \ | |
--strict \ | |
--verbose \ | |
mas-cli/tap/mas | |
homebrew-core: | |
if: ${{ needs.start.outputs.pre_release == 'false' }} | |
runs-on: macos-15 | |
needs: [start, homebrew-tap] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Include all history & tags for script/version | |
fetch-depth: 0 | |
ref: ${{ needs.start.outputs.mas_version }} | |
- name: 👢 Bootstrap | |
run: | | |
script/bootstrap -f | |
- name: 🍺 Update homebrew-core mas formula | |
env: | |
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }} | |
run: | | |
script/brew_core_update ${{ needs.start.outputs.dry_run }} |