-
Notifications
You must be signed in to change notification settings - Fork 275
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
Release improvements #640
Draft
rgoldberg
wants to merge
93
commits into
mas-cli:main
Choose a base branch
from
rgoldberg:638-release-improvements
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Release improvements #640
Conversation
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
houndci-bot
reviewed
Nov 16, 2024
rgoldberg
force-pushed
the
638-release-improvements
branch
6 times, most recently
from
November 17, 2024 00:13
03de1d2
to
8306c6e
Compare
rgoldberg
force-pushed
the
638-release-improvements
branch
7 times, most recently
from
November 18, 2024 06:56
0faa0f8
to
ef6bd6e
Compare
@phatblat I've incorporated your fixes from the If you have any other fixes that weren't already in that branch in this repo at the time when this comment was posted, please share them with me so I can incorporate them into the branch for this PR. Thanks. |
rgoldberg
force-pushed
the
638-release-improvements
branch
4 times, most recently
from
November 20, 2024 06:07
f06fedd
to
4856cee
Compare
Closed
rgoldberg
force-pushed
the
638-release-improvements
branch
2 times, most recently
from
November 21, 2024 03:59
9016365
to
c169e88
Compare
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
…sistent with the shebangs that are used throughout. Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
…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]>
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
…ify & speedup workflow. Move all environment variables to the top level. Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
…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]>
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
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]>
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
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]>
`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]>
…` target has been merged into `mas` target. Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
force-pushed
the
638-release-improvements
branch
from
November 21, 2024 20:45
41c1f62
to
aabdb51
Compare
rgoldberg
added
the
🧽 chore
Administrative task: documentation, build, test, release, git, etc.
label
Nov 21, 2024
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
… 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]>
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
…format`. Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
Remove useless `--strict` from `swiftlint` in `script/format`. Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
Partial mas-cli#638 Signed-off-by: Ross Goldberg <[email protected]>
rgoldberg
force-pushed
the
638-release-improvements
branch
from
November 23, 2024 11:55
94bf065
to
02f2bd4
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@phatblat
I've incorporated your fixes from https://github.com/mas-cli/mas/tree/638/release-fixes into the branch for this PR, and the 1.8.8-beta.1 test run doesn't need to be release, so we should be able to delete the following branches:
I've rebased this PR's branch on updated
main
, so if you want to look at or test my release process, please force checkout this PR's branch.Release Workflow
We shouldn't start our automated release workflow after the release has been published (
on: release: types: published
), because the release then will have 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 asking the
homebrew-core
maintainers to approve anmas
formula bump PR, or for labelling / approving the bump PR for themas-cli/tap/mas
formula:We should support only one way to start the 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 PR (possibly submitted as a draft PR)homebrew-core
, as the latter would implicitly ask thehomebrew-core
maintainers to approve the bumpStage 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 switch thehomebrew-core
mas
&mas-cli/tap/mas
formula bump PRs from drafts to normal submissions, and will apply labels / approve the latter PR.Dry Run
Need we support explicit dry runs?
If we create a GitHub Release draft as per above, we can always delete the draft, and we can always close the generated draft PRs without them having been approved or merged.
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
This is my WIP of improvements for the release process, plus some unrelated cleanup.
I haven't tested it, as I'm worried about accidentally releasing a new version.
I've incorporated all your changes from your
638/release-fixes
, so that can be deleted.Can you let me know if my changes are good, should be modified, or should be discarded?
The general principle of this PR 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:
release.yml
.home-brew-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