-
Notifications
You must be signed in to change notification settings - Fork 274
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #510 from mas-cli/gha/release-workflow
- Loading branch information
Showing
33 changed files
with
999 additions
and
428 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--action-offline-mode | ||
--eventpath .github/event.json | ||
--container-architecture linux/amd64 | ||
--log-prefix-job-id | ||
--platform macos-14=-self-hosted | ||
--pull=false | ||
--reuse | ||
--secret-file .secrets |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"inputs": { | ||
"NAME": "Manual Workflow", | ||
"SOME_VALUE": "ABC" | ||
}, | ||
"release": { | ||
"name": "v1.8.6-beta.1: macOS only test build", | ||
"tag_name": "v1.8.7-beta.1", | ||
"target_commitish": "f8be3e9aaa6c78490277976f17041f2577f5dc21", | ||
"body": "This is a pre-release to facilitate testing for the following fix:\n\n - 🖥️ Only search, outdated and update macOS apps (#505, #496, #491, #336)" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes | ||
--- | ||
changelog: | ||
categories: | ||
- title: '🚀 Features' | ||
- title: "🚀 Features" | ||
labels: | ||
- '🆕 feature request' | ||
- title: '🐛 Bug Fixes' | ||
- "🆕 feature request" | ||
- title: "🐛 Bug Fixes" | ||
labels: | ||
- '🐛 bug' | ||
- "🐛 bug" | ||
- title: Changes | ||
labels: | ||
- '*' | ||
- "*" |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,21 @@ | ||
name: Danger | ||
# | ||
# .github/workflows/danger.yml | ||
# | ||
# https://docs.github.com/en/actions/reference/environment-variables#default-environment-variables | ||
--- | ||
name: danger | ||
on: | ||
pull_request: | ||
branches: [ main ] | ||
branches: [main] | ||
jobs: | ||
danger: | ||
name: Danger | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Danger | ||
# https://github.com/orgs/danger/packages/container/package/danger-swift | ||
uses: docker://ghcr.io/danger/danger-swift:3.12.3 | ||
with: | ||
args: --failOnErrors --no-publish-check | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: actions/checkout@v4 | ||
- name: Danger | ||
# https://github.com/orgs/danger/packages/container/package/danger-swift | ||
uses: docker://ghcr.io/danger/danger-swift:3.18.0 | ||
with: | ||
args: --failOnErrors --no-publish-check | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# | ||
# .github/workflows/pr-checks.yml | ||
# | ||
# https://docs.github.com/en/actions/reference/environment-variables#default-environment-variables | ||
--- | ||
name: pr-checks | ||
on: | ||
pull_request: | ||
branches: [main] | ||
push: | ||
branches: [main] | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
build-test: | ||
runs-on: macos-14 | ||
defaults: | ||
run: | ||
# Prefixes all `run` commands with the following command to force them to run outside Rosetta. | ||
# https://github.com/actions/runner/issues/805#issuecomment-942784948 | ||
# https://github.com/rolpdog/cffi-mirror/blob/release-1.15/.github/workflows/ci.yaml#L81-L141 | ||
# https://github.com/actions/virtual-environments/issues/2187#issuecomment-790507204 | ||
shell: arch -arm64 bash --noprofile --norc -eo pipefail {0} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
# A fetch-depth of 0 includes all history and tags for script/version | ||
fetch-depth: 0 | ||
- name: Bootstrap | ||
run: script/bootstrap -f | ||
- name: Build | ||
run: script/build | ||
- name: Test | ||
run: script/test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
# | ||
# .github/workflows/release.yml | ||
# | ||
--- | ||
name: release | ||
defaults: | ||
run: | ||
# Prefixes all `run` commands with the following command to force them to run outside Rosetta. | ||
shell: arch -arm64 bash --noprofile --norc -eo pipefail {0} | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
start: | ||
runs-on: macos-14 | ||
steps: | ||
# Logs event details and sets `DRY_RUN` env var | ||
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable | ||
# https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=published#release | ||
- name: 🔈 Log release event | ||
# This step will only run 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 -e "release.body: \n${{ github.event.release.body }}" | ||
echo "DRY_RUN=false" >>$GITHUB_ENV | ||
echo "MAS_VERSION=${{ github.event.release.tag_name }}" >>${GITHUB_ENV} | ||
echo "RELEASE_COMMIT=${{ github.event.release.target_commitish }}" >>${GITHUB_ENV} | ||
- name: 🔈 Log environment variables | ||
run: | | ||
echo "DRY_RUN: ${DRY_RUN}" | ||
echo "MAS_VERSION: ${MAS_VERSION}" | ||
echo "RELEASE_COMMIT: ${RELEASE_COMMIT}" | ||
pkg-installer: | ||
runs-on: macos-14 | ||
needs: start | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
# A fetch-depth of 0 includes all history and tags for script/version | ||
fetch-depth: 0 | ||
|
||
- name: 👢 Bootstrap | ||
run: | | ||
script/bootstrap -f | ||
# Important to trigger a universal build first as package just works with | ||
# the `mas` binary in finds in the build dir. | ||
- name: 🏗️ Build Universal | ||
run: | | ||
script/build --universal | ||
- name: 📦 macOS Package | ||
run: | | ||
script/package | ||
- name: 🚀 Upload mas.pkg | ||
if: ${{ env.DRY_RUN == 'false' }} | ||
run: | | ||
gh release upload ${MAS_VERSION} \ | ||
.build/mas.pkg | ||
homebrew-core: | ||
runs-on: macos-14 | ||
needs: start | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
# A fetch-depth of 0 includes all history and tags for script/version | ||
fetch-depth: 0 | ||
|
||
- name: 👢 Bootstrap | ||
run: | | ||
script/bootstrap -f | ||
- name: 🍺 Update Homebrew mas formula | ||
run: | | ||
DRY_RUN=${{ env.DRY_RUN }} \ | ||
script/brew_core_update ${{ env.MAS_VERSION }} | ||
homebrew-tap: | ||
runs-on: macos-14 | ||
needs: [start, homebrew-core] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
# A fetch-depth of 0 includes all history and tags for script/version | ||
fetch-depth: 0 | ||
|
||
- name: 👢 Bootstrap | ||
run: | | ||
script/bootstrap -f | ||
- name: 🚰 Update mas tap formula | ||
run: | | ||
DRY_RUN=${{ env.DRY_RUN }} \ | ||
script/brew_tap_update ${{ env.MAS_VERSION }} | ||
- name: 🍼 Homebrew Bottles for mas tap | ||
run: | | ||
script/bottle | ||
- name: 🚀 Upload Bottles | ||
if: ${{ env.DRY_RUN == 'false' }} | ||
run: | | ||
gh release upload ${MAS_VERSION} \ | ||
.build/bottles/mas-*.bottle.tar.gz |
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# | ||
# .mise.toml | ||
# https://mise.jdx.dev/configuration.html | ||
# | ||
|
||
[tools] | ||
act = "0.2.60" | ||
"npm:prettier" = "3.2.5" | ||
|
||
[settings] | ||
experimental = true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
--- | ||
retain_public: true | ||
strict: true |
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
Oops, something went wrong.