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

Add release CI workflows #20

Merged
merged 2 commits into from Feb 13, 2022
Merged

Conversation

kenji-miyake
Copy link
Contributor

As explained in #17,

  • github-release.yaml will prepare the release when a tag is published.
  • actions-tagger.yaml will generate a v1/v2/v3 tag when a release is published.

Kenji Miyake added 2 commits February 13, 2022 01:43
Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>
Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>
gh release create "${{ github.ref_name }}" \
--draft \
--title "Release ${{ github.ref_name }}" \
--notes ""
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can customize this --notes.
My recommendation is, as commented in #17 (comment), to follow Conventional Commits and automatically generate changelogs by git-cliff.

Please see the followings:

How would you like it?

- name: Release to GitHub
run: |
gh release create "${{ github.ref_name }}" \
--draft \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove this --draft.
Please see https://cli.github.com/manual/gh_release_create for other options.

@platisd
Copy link
Owner

platisd commented Feb 13, 2022

Can you describe how to use/trigger this?

@kenji-miyake
Copy link
Contributor Author

@platisd Just pushing a tag from your local, and publishing the created release from here!

release:
types:
- published
- edited
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means the workflow runs when you publish or edit releases.

on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means the workflow runs when you publish x.y.z tags.

@platisd
Copy link
Owner

platisd commented Feb 13, 2022

@platisd Just pushing a tag from your local, and publishing the created release from here!

Alright so there's no special format that's needed. Any pushed tag will create a draft release, correct?

@kenji-miyake
Copy link
Contributor Author

Yes, any tag that matches "[0-9]+.[0-9]+.[0-9]+" triggers the workflow.
The condition can be customized if needed.

@platisd
Copy link
Owner

platisd commented Feb 13, 2022

Not a fluent regex speaker, so a tag as 1.2.3 will trigger it but one as v1.2.3 will not. OK, sounds consistent to the current versioning scheme. 👍

@platisd platisd merged commit 10dea67 into platisd:master Feb 13, 2022
@kenji-miyake kenji-miyake deleted the add-release-ci branch February 14, 2022 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants