-
Notifications
You must be signed in to change notification settings - Fork 43
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
build: semantic release #746
Conversation
apparently semantic-release likes this better I don't know
technically a chore but making it a feat to see what semantic-release does with it
# [8.6.0-next.2](v8.6.0-next.1...v8.6.0-next.2) (2023-02-10) ### Features * add git + changelog plugins ([85e4bfd](85e4bfd)) [skip ci]
This reverts commit 4c34207.
hopefully this will put the extra tag on the correct commit?
This reverts commit 05300e7.
github actions don't appear to run for the merge commit and I don't know why so I'm just gonna have it skip CI entirely in a cleaner platform-native way https://github.blog/changelog/2021-02-08-github-actions-skip-pull-request-and-push-workflows-with-skip-ci/
.releaserc.yml
Outdated
# in the `postversion` npm hook | ||
- '@semantic-release/npm' | ||
# Lightweight alternative to `@semantic-release/github` that creates a draft release | ||
- ['@semantic-release/exec', { 'publishCmd': 'gh release create ${nextRelease.version} --draft --generate-notes' }] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL that the GitHub CLI is pre-installed on GitHub Actions runners: https://docs.github.com/en/actions/using-workflows/using-github-cli-in-workflows
@@ -29,7 +29,7 @@ | |||
], | |||
"repository": { | |||
"type": "git", | |||
"url": "git://github.com/readmeio/rdme.git" | |||
"url": "https://github.com/readmeio/rdme.git" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess semantic-release
actually uses this field and likes this better 🤷🏽♂️
@@ -1,3 +1,66 @@ | |||
# [8.6.0-next.7](https://github.com/readmeio/rdme/compare/v8.6.0-next.6...v8.6.0-next.7) (2023-02-13) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are a few formatting discrepancies in this file now but I really care to be honest
# since we're also updating the action.yml file with every release! | ||
# Uncomment this line below once those changes are live: | ||
# assets: ['action.yml', 'CHANGELOG.md', 'package.json', 'package-lock.json'], | ||
message: "build(release): 🚀 v${nextRelease.version} 🦉\n\n${nextRelease.notes}\n[skip ci]", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[skip ci]
is a special phrase, see https://github.blog/changelog/2021-02-08-github-actions-skip-pull-request-and-push-workflows-with-skip-ci/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
A couple of general questions:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great documentation! 🙇🏼
A couple of reasons!
Yeah I remember those issues... will report back once this workflow actually runs in |
Thanks @kanadgupta. The issue with GHA permissions was that you couldn't use GHA to actually make commits on a git branch. You could interact with the API as much as you wanted (for tagging, replying to issues, etc) but you couldn't actually save the commit to update the version number or the changelog. Were you able to test it on a branch and have it actually make a commit on that branch? It's been over a year since I looked at that, so maybe they got it working in a newer version of semantic-release? |
@RyanGWU82 yeah there are a few examples on this branch if you want to look, like this one: 05af285 I also tried adding protections to this branch and it still appeared to work 🧐 |
* chore: initial commit * chore: how about this? * chore: what about this * fix: try this instead * chore: see if warnings are surfaced properly * Revert "chore: see if warnings are surfaced properly" This reverts commit edaf715. * revert: restore simple.yml * chore: update dockerfile path * build: semantic release (#746) * chore: shorten docker path * perf: try using alpine
# [8.6.0](v8.5.0...v8.6.0) (2023-03-29) ### Bug Fixes * bad merge ([e15c574](e15c574)) * bump node version in release workflow ([7f3158f](7f3158f)) * does this work? ([c81e432](c81e432)) * memory leak in large file handling within openapi-parser ([#784](#784)) ([1b1cc00](1b1cc00)) * next channel ([ce4e494](ce4e494)) * **openapi:** yaml strings would be improperly parsed as Date objects ([#779](#779)) ([72e75cb](72e75cb)) * rebuild prior to npm publish ([29b9ec6](29b9ec6)) * reformat github release header ([38c5625](38c5625)) * reformat header again ([bd2e1a2](bd2e1a2)) * remove some of the package scripts ([3eb52fd](3eb52fd)) * remove unnecessary config ([c22889c](c22889c)) * run tests but NOT release workflow on release commits ([24f885e](24f885e)) * temporarily disable release workflow ([a935268](a935268)) * try rearranging steps like this ([cac0c1d](cac0c1d)) * try this approach to lifecycle events ([4e5ecff](4e5ecff)) * try this as an alternative to @semantic-release/github ([8c343a0](8c343a0)) * try this to see if branch protections work ([f314c3f](f314c3f)) * turns out these rules weren't redundant ([f9f82f1](f9f82f1)) * upgrading `oas-normalize` to move to our `postman-to-openapi` fork ([#776](#776)) ([ee8ce0a](ee8ce0a)) ### Features * add git + changelog plugins ([85e4bfd](85e4bfd)) * container registry ([#777](#777)) ([d193416](d193416)), closes [/github.com//pull/777#discussion_r1145516673](https://github.com//github.com/readmeio/rdme/pull/777/issues/discussion_r1145516673) [/github.com//pull/777#discussion_r1145528308](https://github.com//github.com/readmeio/rdme/pull/777/issues/discussion_r1145528308) * docker (again) ([#763](#763)) ([2144572](2144572)), closes [#746](#746) * empty commit to trigger release ([3e3c112](3e3c112)) * fix comment ([076cfbf](076cfbf)) ### Performance Improvements * **docker:** build executable ([#764](#764)) ([af2dbce](af2dbce)) ### Reverts * Revert "feat: drop duplicative tag" ([f9fe6c6](f9fe6c6)) * bring workflow name back ([c07495a](c07495a)) * don't set header for changelog ([194489e](194489e)) * restore release workflow ([9f6bbc9](9f6bbc9)) * ugh here we go again ([0b1e429](0b1e429)) [skip ci]
🧰 Changes
This PR brings
semantic-release
into the mix so we can have a proper pre-release tagging/release process for some of the upcoming Docker build stuff we're doing.Here's an overview of the changes:
main
tonext
(already done)next
branch and a proper release process tied to thenext
branchsemantic-release
plugin setup that publishes releases to GitHub andnpm
(seeMAINTAINERS.md
in this PR for more information)Outstanding Tasks
bin/set-major-version-tag.js
tags the right commitv8.0
vs8.0
) (update:removed it for now, I think it should be fine?got it working again)got something better going but it's not super prettygonna create draft releases withgh
instead)semantic-release
plugin for publishing to GitHub's container registry (edit: this should actually work)See if I need to generate a GitHub token with more permissions in order to trigger a(edit: don't think I actually need this)released
event (further reading)semantic-release
branchmain
back intonext
will work (we won't know until all of this is live 😬)🧬 QA & Testing
I ran a bunch of test workflows against this branch. Here are a few artifacts for
8.6.0-next.8
to confirm this is working as expected1:semantic-release
: 05af2858.6.0-next.8
andv8.6.0-next.8
version
field in thepackage.json
next
channel): https://www.npmjs.com/package/rdme/v/8.6.0-next.8The main files that actually necessitate your review are
.releaserc.yml
andMAINTAINERS.md
🥺Footnotes
(and let me know if I missed anything! lots of moving parts 😮💨) ↩