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 workflow to github, pypi, and docker hub #10

Merged
merged 62 commits into from
Sep 3, 2024

Conversation

grqz
Copy link
Collaborator

@grqz grqz commented Sep 1, 2024

Closes #2

Examples (released by 81becb3):

Known limitations:

Features:

  • Creates Releases
  • Also aims to replace build.yml
  • Don't push to Docker Hub when run from pull_request trigger. To push the image, trigger the workflow manually with workflow_dispatch
  • Can overwrite PyPI, Docker Hub, Github releases

PR todos:

  • Fix Docker tags/labels, determine whether the Docker meta step is necessary. Probably generate with shell instead.
  • Add changelog for Github Release
  • Add "Overview" for Docker Hub Release. See if possible to get it automated
  • Fix Docker tags for prs
  • Allow overwriting binaries for github releases
  • Allow overwriting binaries for PyPI releases

to deploy this workflow file to this repo:

to make a new release:

  1. Increment project.version in plugin/pyproject.toml
  2. Trigger the workflow in the actions page

Code References:

@grqz grqz marked this pull request as ready for review September 1, 2024 06:08
Copy link
Owner

@Brainicism Brainicism left a comment

Choose a reason for hiding this comment

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

Thanks for the awesome work! Just a few comments

plugin/pyproject.toml Outdated Show resolved Hide resolved
.github/workflows/release.yml Outdated Show resolved Hide resolved
.github/workflows/release.yml Show resolved Hide resolved
@Brainicism
Copy link
Owner

Not sure if we want to do it in this PR or after the first pypi release, but we should include the pip install instructions on the README

@grqz
Copy link
Collaborator Author

grqz commented Sep 1, 2024

Not sure if we want to do it in this PR or after the first pypi release, but we should include the pip install instructions on the README

probably do a follow-up pr after a pypi release is made
EDIT: #12

- add a simple changelog to github release
- run docker/pypi release after gh release as gh release workflow creates a new branch
- docker rel: + version from github release workflow
- [gh]fix changelog
- [docker] try peter-evans/dockerhub-description@v4
@Brainicism
Copy link
Owner

I've set the required repo secrets for dockerhub personal access token

- [docker] get project description as docker img description
- [docker] add official repository link
- [pypi] remove `needs` to save time
- [pypi] more concise builder
plugin/pyproject.toml Outdated Show resolved Hide resolved
- [github] better changelog
- [docker] fix description: extract from the `meta` step
- [github] fix unmatched single quotes
- [github] Fix git log cmd when generating changelog: branch not yet created
@Brainicism
Copy link
Owner

Created trusted publisher on pypi

.github/workflows/release.yml Outdated Show resolved Hide resolved
@grqz
Copy link
Collaborator Author

grqz commented Sep 2, 2024

- [gh] remove the redundant assignment to `tag`
- fix docker tags for pr
- [docker] cleanup
[gh] cleanup: correct annotation position
Prob last build, just to test whether everything is working
@grqz
Copy link
Collaborator Author

grqz commented Sep 2, 2024

  • Change project.name back to normal in plugin/pyproject.toml (needs changes in the repo)
  • Change project.version to the normal one in plugin/pyproject.toml (needs changes in the repo)

done in 62aa290

plugin/pyproject.toml Outdated Show resolved Hide resolved
@Brainicism
Copy link
Owner

Good to merge at your discretion

@grqz
Copy link
Collaborator Author

grqz commented Sep 3, 2024

Good to merge at your discretion

all things on the TODO list have been done, you can merge it now

@Brainicism Brainicism merged commit 38d2b72 into Brainicism:master Sep 3, 2024
3 checks passed
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.

Add release workflow
2 participants