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

implement workflows for automatic releases #22

Merged
merged 2 commits into from
Jan 12, 2024

Conversation

luka5
Copy link
Contributor

@luka5 luka5 commented Dec 8, 2023

As discussed in #19, I did implement some workflows to automate the release process. This process now looks like:

  1. Trigger Workflow: Prepare new Release
    • Can be executed manually or included in some other workflow
    • Takes the new version as input argument
    • Updates the Readme + Makefile, runs make gen-harbor-api
    • Creates a PR
  2. Manually review PR + merge it
  3. Automatically triggered Workflow: Release new Version Tag
    • Runs on PR merge (or actually push to main)
    • Creates the Release + Tag

This requires the setting Allow GitHub Actions to create and approve pull requests in Settings > Actions > General to be enabled.

Tested in https://github.com/luka5/go-client/pulls

Signed-off-by: Lukas Hauser <lukas.hauser@tngtech.com>
Signed-off-by: Lukas Hauser <lukas.hauser@tngtech.com>
@luka5 luka5 mentioned this pull request Dec 8, 2023
@luka5
Copy link
Contributor Author

luka5 commented Dec 10, 2023

To trigger this workflow automatically, we could consider adding gh workflow --repo goharbor/go-client run prepare-new-version.yml --field version=${{ github.event.inputs.version }} in the publish_release.yml workflow in goharbor/harbor. Just make sure, the token has enough permissions to trigger the workflow.

What do you think about this PR @chlins @wy65701436 @Vad1mo ?

@Vad1mo
Copy link
Member

Vad1mo commented Dec 10, 2023

Thank you for your contribution, this looks good.

@stonezdj stonezdj merged commit 68866ff into goharbor:main Jan 12, 2024
1 check passed
@stonezdj
Copy link
Contributor

Hi, @luka5 After I merged your PR and triggered the action "Prepare new release" and input 2.10.0. but there is no release named 2.10.0 created. could you please describe the detail process to create a new release?

@luka5
Copy link
Contributor Author

luka5 commented Jan 12, 2024

Hi @stonezdj, the "Prepare new release" run (https://github.com/goharbor/go-client/actions/runs/7499663802/job/20416866914) did create #23.

Now you can review it and approve. After merge, the new release will be created in https://github.com/goharbor/go-client/actions/workflows/tag-release.yml

@luka5
Copy link
Contributor Author

luka5 commented Jan 12, 2024

It looks like we should add the -s in https://github.com/goharbor/go-client/blob/main/.github/workflows/prepare-new-version.yml#L31

@luka5 luka5 deleted the automatic-release-process branch January 12, 2024 09:22
@Vad1mo
Copy link
Member

Vad1mo commented Jan 12, 2024

@luka5 can we add that feature -s

@luka5
Copy link
Contributor Author

luka5 commented Jan 12, 2024

here we go: #24

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.

3 participants