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

Create workflow actions for automated releasing #86

Merged
merged 2 commits into from
Jun 10, 2024
Merged

Conversation

zmarkan
Copy link
Contributor

@zmarkan zmarkan commented Jun 4, 2024

New release and snapshots actions for automated publishing to Maven Central. Fulfills https://github.com/getditto/DittoAndroidTools/issues/80

Release workflow triggers on new release publish in GitHub - all projects with the same version deployed at the same time - so we can keep consistency. Signing is automated, using GitHub's secrets.

Snapshots workflow currently doesn't work but would ideally trigger nightly. Leaving the script in there to eventually debug & fix.

Let me know if it makes sense - happy to walk you folks through it & answer any Qs.

And most importantly thanks Raj for your help looking at error logs!!!

try create release workflow action

publish and snapshots pipelines

trigger on push for testing
@rajramsaroop
Copy link
Contributor

Sorry if this is a silly question as I'm not that familiar with GHA. Can anyone with a GH account run the GHA, or do we need to setup permissions so that only certain people/level of access can publish?

@rajramsaroop
Copy link
Contributor

I think we should add either a RELEASING.md or something in Notion to describe how to release to describe the workflow for updating the versions then publishing etc.

Copy link
Contributor

@rajramsaroop rajramsaroop left a comment

Choose a reason for hiding this comment

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

Scripts look good to me, just left 2 comments.

@zmarkan
Copy link
Contributor Author

zmarkan commented Jun 5, 2024

Sorry if this is a silly question as I'm not that familiar with GHA. Can anyone with a GH account run the GHA, or do we need to setup permissions so that only certain people/level of access can publish?

At the moment, anyone with write access to the repo can publish a release which will trigger the release action. Seemed like a sensible default option.
If we need to, we can change permissions / triggers so that only members of certain groups can do it. Happy to hear others' thoughts?

I think we should add either a RELEASING.md or something in Notion to describe how to release to describe the workflow for updating the versions then publishing etc.

Great idea - I'll write it up this morning. Can draft it in notion then either move to the repo or keep there.

@zmarkan
Copy link
Contributor Author

zmarkan commented Jun 5, 2024

I documented everything - the process and the scripts.
I think this should cover everything: https://www.notion.so/getditto/Publishing-Automation-f3ff687ee9f24e059bbc85af716f2d3d

@zmarkan zmarkan requested a review from rajramsaroop June 5, 2024 10:16
@bplattenburg
Copy link
Member

@zmarkan Thanks for documenting! I think that is the right place to leave those docs given this is a public repo

Copy link
Contributor

@rajramsaroop rajramsaroop left a comment

Choose a reason for hiding this comment

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

Great work!

I think the current permissions are fine, but we can revisit later if anyone wants something different.

Notion doc is a good place too.

@okdistribute
Copy link
Collaborator

Nice!

@zmarkan
Copy link
Contributor Author

zmarkan commented Jun 10, 2024

So do we just merge now it's been approved? Or is there a step in the flow that I'm missing?

@rajramsaroop
Copy link
Contributor

So do we just merge now it's been approved? Or is there a step in the flow that I'm missing?

Yes you can merge!

@zmarkan zmarkan merged commit 4da7334 into main Jun 10, 2024
@zmarkan zmarkan deleted the zan/cicd-pipeline branch June 10, 2024 13:27
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.

5 participants