-
Notifications
You must be signed in to change notification settings - Fork 4
chore: 🤖 improve release action #33
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
Conversation
88221d1
to
29bec14
Compare
@kodai3 |
Signed-off-by: kodai3 <k3dai.su3@gmail.com>
Signed-off-by: kodai3 <k3dai.su3@gmail.com>
Signed-off-by: kodai3 <k3dai.su3@gmail.com>
Signed-off-by: kodai3 <k3dai.su3@gmail.com>
Signed-off-by: kodai3 <k3dai.su3@gmail.com>
d9d3927
to
0930d7d
Compare
@takanorip You can create a PR by workflow dispatch, selecting semver versions Then, PR with what's Changed and diff for When you merge to the main branch, |
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.
🎉
|
||
- name: Set GitHub Release Note | ||
id: release_note | ||
uses: actions/github-script@v6 |
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.
We should use actions/github-script@v7
|
||
- name: Create Pull Request | ||
id: cpr | ||
uses: peter-evans/create-pull-request@v4 |
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.
We should use peter-evans/create-pull-request@v6
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Publish | ||
if: steps.tag_check.outputs.exists_tag == 'false' |
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.
It seems this script is not working properly. Should this condition be set to steps.tag_check.outputs.exists_tag == 'true'
?
https://github.com/ubie-oss/ubie-icons/actions/runs/8985341603/job/24679125682
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.
it shuold be 'false'.
Because exists_tag
is true if the version in the package.json and latest tag's version are aligned, and if so we don't want to release it.
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.
That means the reason it's not working properly this time is because the tags and the version in the package.json
don't match. At a glance, they seem to match though...
run: npm run build | ||
|
||
- name: Release | ||
run: npx release-it -i ${{ github.event.inputs.semver }} --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.
This release notes have become a list of commits, so I'd like them to be formatted to match the other release notes.
https://github.com/ubie-oss/ubie-icons/releases/tag/v0.6.2
https://github.com/ubie-oss/ubie-icons/releases/tag/v0.6.1
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.
The -i
option might not be necessary. I couldn't find any documentation related to this.
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 was using and experimented the base action for repo which uses squash merge, so I didn't notice this pain...
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.
The -i
option is in fact important. you can find with --help command. It is used to specify the semver version you selected on the workflow dispatch.
npx release-it --help
Release It! v17.2.1
Usage: release-it <increment> [options]
Use e.g. "release-it minor" directly as shorthand for "release-it --increment=minor".
-c --config Path to local configuration options [default: ".release-it.json"]
-d --dry-run Do not touch or write anything, but show the commands
-h --help Print this help
-i --increment Increment "major", "minor", "patch", or "pre*" version; or specify version [default: "patch"]
--ci No prompts, no user interaction; activated automatically in CI environments
--only-version Prompt only for version, no further interaction
-v --version Print release-it version number
--release-version Print version number to be released
--changelog Print changelog for the version to be released
-V --verbose Verbose output (user hooks output)
-VV Extra verbose output (also internal commands output)
"github": { | ||
"release": true | ||
} |
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.
Related to this. This might work.
"github": {
"release": true,
"autoGenerate": true
}
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.
We cannot rely on this because we don't want to push the tag before merging the PR. (publishing to npm)
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 understand... 😭
@kodai3 |
Same release action introduced in the https://github.com/ubie-oss/ubie-ui