Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

πŸ‘·πŸ»β€β™‚οΈ GHA release workflow #510

Merged
merged 81 commits into from
Mar 31, 2024

Conversation

phatblat
Copy link
Member

@phatblat phatblat commented Feb 18, 2024

πŸš€ New release GHA Workflow

This workflow is triggered based on the publishing of a GitHub Release. The process to kick it off will be as follows:

  1. Start drafting a new release.
  2. Create a tag in the format v1.2.3 (with an optional -prerelease.4 suffix).
  3. Enter release notes in the body field.
  4. Click the "Publish release" button.
  5. This new release workflow will run.

The release progress can be monitored by navigating to the "Actions" tab at the top of the page. If there are problems building the artifacts or publishing to Homebrew core, they will need to be addressed in a PR and a new release. The reason for this is the workflow definition will be taken from the state at the tag for the given release. Deleting and recreating tags or releases is not recommended as people may have already started using mas from that version.

Jobs in release workflow

  • start - Sets DRY_RUN and MAS_VERSION variables based on context
  • pkg-installer - Builds and uploads mas.pkg
  • homebrew-core - Updates the mas formula in the homebrew/core tap
  • homebrew-tap - Waits for homebrew-core to succeed and updates the mas-cli/homebrew-tap tap

More details of each jobbelow.

pkg-installer

Runs the package script to build the macOS installer package file and uploads it to the GitHub release. This file is for those that want to manually install without using Homebrew.

  • mas.pkg

homebrew-core

Runs the brew_core_update script using the brew bump-formula-pr command. It also creates a new PR with the changes to the homebrew package formulae to update main.

homebrew-tap

Runs the brew_tap_update script to build mas bottles and upload them to the GitHub release for mas-cli/homebrew-tap:

Uploaded Artifacts

This job will upload artifacts such as the following to the GitHub Release:

  • mas-1.8.6.arm64_big_sur.bottle.tar.gz
  • mas-1.8.6.arm64_monterey.bottle.tar.gz
  • mas-1.8.6.arm64_sonoma.bottle.tar.gz
  • mas-1.8.6.arm64_ventura.bottle.tar.gz
  • mas-1.8.6.big_sur.bottle.tar.gz
  • mas-1.8.6.catalina.bottle.tar.gz
  • mas-1.8.6.el_capitan.bottle.tar.gz
  • mas-1.8.6.high_sierra.bottle.tar.gz
  • mas-1.8.6.mojave.bottle.tar.gz
  • mas-1.8.6.monterey.bottle.tar.gz
  • mas-1.8.6.sierra.bottle.tar.gz
  • mas-1.8.6.sonoma.bottle.tar.gz
  • mas-1.8.6.ventura.bottle.tar.gz

@phatblat phatblat added 🧽 chore Administrative task: documentation, build, test, release, git, etc. 🍺 homebrew labels Feb 18, 2024
@phatblat phatblat self-assigned this Feb 18, 2024
@phatblat phatblat requested a review from a team as a code owner February 18, 2024 16:46
@phatblat phatblat changed the base branch from main to releases/release-1.8.7 February 18, 2024 16:46
@phatblat phatblat marked this pull request as draft February 18, 2024 18:14
@phatblat phatblat marked this pull request as ready for review March 31, 2024 19:38
@phatblat
Copy link
Member Author

@rgoldberg I think this new release workflow is finally ready. I'll need to test it on the release branch so you'll probably see a number of test releases soon.

@phatblat phatblat merged commit 08c6c98 into releases/release-1.8.7 Mar 31, 2024
1 check passed
@phatblat phatblat deleted the gha/release-workflow branch March 31, 2024 19:41
@phatblat phatblat mentioned this pull request Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧽 chore Administrative task: documentation, build, test, release, git, etc. 🍺 homebrew
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant