-
Notifications
You must be signed in to change notification settings - Fork 274
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
Improve release process #638
Labels
🧽 chore
Administrative task: documentation, build, test, release, git, etc.
Milestone
Comments
rgoldberg
added
the
🧽 chore
Administrative task: documentation, build, test, release, git, etc.
label
Nov 15, 2024
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Nov 16, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Nov 16, 2024
…sistent with the shebangs that are used throughout. Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Nov 16, 2024
…sion values. It only seems to be used for testing with `act`. `event.json` should either be generated or be manually created; in either case, it should reside somewhere that is ignored by git, as the only source of version info in git should be version tags. Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Nov 16, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Nov 16, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Nov 16, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Nov 16, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Nov 16, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Nov 16, 2024
…mmand substitutions, respectively. Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Nov 16, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Nov 16, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Nov 16, 2024
…g it. Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Nov 16, 2024
Remove commented code. Improve step name. Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Nov 16, 2024
…b instead of once per each step of that job. Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Nov 16, 2024
…per the linked documentation (https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable). Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Nov 16, 2024
Change YAML emoji to fix spacing issue. Move YAML lint before Git lint to keep the names getting progressively shorter. Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Nov 16, 2024
We shouldn't need to delete `Brewfile.lock.json` because it doesn't actually lock anything; it just records versions that were installed. If we don't delete it, new `brew bundle install` run just adds info about what was installed during its run to the existing info about previous bundle installs. By not deleting, the code can be simplified as per this commit. Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Nov 16, 2024
Remove mise. Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Nov 16, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Nov 16, 2024
…same OS, then a checksum is required only for the oldest OS version that shares that bottle/checksum; all later versions of the OS will use that checksum. Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Nov 16, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Nov 16, 2024
Fix acceptable argument count. Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Nov 16, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Nov 16, 2024
Use braces around bash variable uses. Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Nov 16, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Nov 16, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Nov 16, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Nov 16, 2024
Ensure no newlines at beginning of any file. Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Dec 2, 2024
…ore` job. Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Dec 2, 2024
…ller` to ensure that custom tap isn't bumped if the package installer wasn't uploaded to the GitHub release. Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Dec 2, 2024
…ify & speedup workflow. Move all environment variables to the top level. Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Dec 2, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Dec 2, 2024
…into `release.yml`. Run `git rev-parse …` instead of `git rev-list -n 1 …` for mas-cli/tap/mas. Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Dec 2, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Dec 2, 2024
Requires corresponding commits to `homebrew-core/mas` & `mas-cli/tap/mas` formulae. Rename `dstroot` variable as `distributions_root` in `script/package`. Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Dec 2, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Dec 2, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Dec 2, 2024
Should only release revisions that have version tags on them, so should only need a single commit. `ref:` should default to the reference for the event, which should be `github.event.release.tag_name`, so shouldn't need to explicitly set it. If any of these changes cause problems, will back them out. Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Dec 2, 2024
`script/package` calls `script/build --universal` instead of requiring the latter to be called before the former. Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Dec 2, 2024
…` target has been merged into `mas` target. Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Dec 2, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Dec 2, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Dec 2, 2024
…to 0.43.0. Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Dec 2, 2024
… tag & current revision for local (i.e. non-release builds), since releases should all be for a version tagged revision. Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Dec 2, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Dec 2, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Dec 2, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Dec 2, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Dec 2, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Dec 2, 2024
…format`. Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Dec 2, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Dec 2, 2024
Remove useless `--strict` from `swiftlint` in `script/format`. Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Dec 2, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Dec 2, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Dec 2, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Dec 2, 2024
Allow `script/bootstrap` to accept any arguments for `brew bundle install`. Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Dec 2, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
added a commit
to rgoldberg/mas
that referenced
this issue
Dec 2, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Release Workflow
The automated release workflow shouldn't be kicked off when a release has been published (
on: release: types: published
), because the release will have then already been made available to the public.If anything fails or is suboptimal (like poorly worded generated release notes) in the workflow, we'd need to either delete, modify, or supersede the botched release, all of which are suboptimal.
It's probably best to split the release process into stages:
Stage 1: Generate Draft
Somehow start a process that creates a GitHub Release draft, and that, while still a draft, performs all the other release steps except for bumping the
homebrew-core
mas
formula & except for labelling / approving the bump PR for themas-cli/tap/mas
formula.We should support only one way to start this stage. Start options include:
v\d+\.\d+\.\d+(?:-(?:alpha|beta|rc)\.\d+)
) is pushed to themain
branch of themas-cli/mas
repo.This stage would:
*.pkg
(s)-
*.pkg
(s) to the draftmas-cli/tap/mas
formula bump PRStage 2: Manual Draft Inspection / Modification
This step could be skipped, but I advise against it. If skipped, stages 1 & 3 could be combined into one continuous script.
The releaser inspects everything created in stage 1, including the GitHub Releases draft (including the generated release notes) & related external PRs. The releaser may then either:
Stage 3: Publish Release / Delete Draft
If the releaser deletes the GitHub Release draft from stage 2, then an
on: release: types: deleted
workflow will close the related external PRs.If the releaser publishes the draft, then an
on: release: types: published
workflow will:Approve / apply the
pr-pull
label to themas-cli/tap/mas
formula bump PR, which will generate bottles for the custom tap inmas-cli/mas
GitHub Releases.Bump the
homebrew-core
mas
formula.Tag Type
Should we use lightweight or annotated tags for versions?
Briefly noted in #655.
Legacy Version Patch Branches
If we ever release patches for legacy mas versions, they should be done in a legacy version patch branch.
Given that we aren't patching legacy versions right now, the first revamp of the new release system doesn't need to support it, but we might want to think through the workflow to support it in the future.
See #655 for details about legacy version patch branches & other tag-related proposals.
Details
The general principle of this issue is simplicity:
mas-cli/mas
repo:Makefile
.github/event.json
homebrew/homebrew-core
ormas-cli/tap
homebrew-core
&mas-cli/tap/mas
formulae in taps instead of locally generating / modifying them.Sources/mas/Package.swift
mas-cli/mas
on release.mas-cli/mas
repo only in version tag, not in any files or in any branch names.brew bump-formula-pr
) instead of reinventing the wheel./bin/bash
is used everywhere instead of some places usingbash
from the$PATH
.sd
: script that used it was deleted, but if script had been kept, should use bash scripting insteadmise
: usebrew bundle
insteadscript/version --write
&script/version_bump
withscript/generate_version_info_for_swift
Sources/mas/Package.swift
) for revisions that aren't directly tagged with a version tag are now specified by the fullgit describe --tags
output, which includes the current revision & the number of commits since the tag.release.yml
jobs into one.cd
into project root at beginning of every bash script.-u
in all bash shebangs.printf
instead ofecho
..editorconfig
.Improvements that are being worked on:
homebrew-core
formula).pr-pull
custom tap bump?release.yml
output release event info only whenname != ''
?mas-cli/tap/mas
/ GitHub Release artifacts:mas.pkg
filename.brew bump-formula-pr
probably won't do that.homebrew-core
?Future tasks include:
actions/checkout@v4
output:git config --global init.defaultBranch main
git config --global advice.detachedHead false
.actrc
--eventpath .github/event.json
to a path under git-ignored.build
?Dangerfile.swift
appears to be used only for PRs made directly onmas-cli/mas
, not for those via forks:release.yml
:env
variables to specific steps?.github/*.yml
into.github/workflows
?Resolve #638, #636, #635, #634, #628
The text was updated successfully, but these errors were encountered: