Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Automate releases using GitHub Actions #89

Open
Rumperuu opened this issue Apr 14, 2021 · 17 comments
Open

Automate releases using GitHub Actions #89

Rumperuu opened this issue Apr 14, 2021 · 17 comments
Assignees
Labels
workflow Workflow improvements

Comments

@Rumperuu
Copy link
Collaborator

Rumperuu commented Apr 14, 2021

Currently releasing still requires human input. Once we are happy that the scripts are not prone to errors, we can automate this fully via GitHub Actions.

Blocked by #88

@Rumperuu Rumperuu added the workflow Workflow improvements label Apr 14, 2021
@Rumperuu Rumperuu added this to the Development workflow set up milestone Apr 14, 2021
@Rumperuu Rumperuu self-assigned this Apr 14, 2021
@markcheret
Copy link
Owner

markcheret commented Apr 14, 2021

You can enable the automation already by releasing to /branches/gh-automation on SVN so I can test the resulting product from there.

@Rumperuu
Copy link
Collaborator Author

Rumperuu commented Apr 14, 2021

You can enable the automation already by releasing to /branches/gh-automation on SVN so I can test the resulting product from there.

I've added a step to copy the code from /trunk to /branches/gh-automation in #90 — I'm going to leave it on draft for the moment though, until I've got stylesheet minification automated. But if you want to checkout the release-automation branch and try it out, you can do.

If you're not sure how to minify the stylesheets during the build process, you can unzip the files in this archive into the /css/tmp directory: minified-stylesheets.zip

@markcheret
Copy link
Owner

Great, thanks.
@Rumperuu What will be the credentials for auto-releasing to SVN?
@pewgeuges As soon as this is closed, all versions of the plugin will only be released to WordPress through GitHub.

@Rumperuu
Copy link
Collaborator Author

Rumperuu commented Apr 14, 2021

@Rumperuu What will be the credentials for auto-releasing to SVN?

I've not looked too much into it at this point, but are you able to create arbitrary SVN commit access credentials or is it tied to WordPress Plugin Directory users that are set up as Contributors? If the former is possible, then it would be best to set up a set of GitHub-specific credentials and use them.

If it's not, then either we could use your creds (I think you can set environment variables in GitHub that GitHub Actions can use but only you can view, but don't quote me on that) or you could add us as SVN contributors and we can use our own credentials (but as this provides no protections against someone committing directly to the SVN repo. outside of the established workflow, this should only the option of last resort).

@pewgeuges As soon as this is closed, all versions of the plugin will only be released to WordPress through GitHub

I think this is asking for trouble in terms of the two codebases diverging further. git svn rebase is already pretty much unusable, so I would recommend that we adopt the GitHub-only development workflow immediately (albeit with releases handled manually for the time being).

@markcheret
Copy link
Owner

markcheret commented Apr 14, 2021

@Rumperuu What will be the credentials for auto-releasing to SVN?

I've not looked too much into it at this point, but are you able to create arbitrary SVN commit access credentials or is it tied to WordPress Plugin Directory users that are set up as Contributors? If the former is possible, then it would be best to set up a set of GitHub-specific credentials and use them.

It has to be a wordpress.org user.

If it's not, then either we could use your creds (I think you can set environment variables in GitHub that GitHub Actions can use but only you can view, but don't quote me on that)

yes that is possible. OK. I'm looking up how it can be done/how others are doing it :)

or you could add us as SVN contributors and we can use our own credentials (but as this provides no protections against someone committing directly to the SVN repo. outside of the established workflow, this should only the option of last resort).

Nah, I don't like that :) Worst case, I'm gonna create a gmail and Wordpress account specifically for footnotes :)

@pewgeuges As soon as this is closed, all versions of the plugin will only be released to WordPress through GitHub

I think this is asking for trouble in terms of the two codebases diverging further. git svn rebase is already pretty much unusable, so I would recommend that we adopt the GitHub-only development workflow immediately (albeit with releases handled manually for the time being).

It's already clear that 2.7.0 was the last direct-to-SVN commit. Sorry for the confusion @pewgeuges and @Rumperuu

@markcheret
Copy link
Owner

for inspiration: https://gist.github.com/philbuchanan/8188898 looks like a local script, though.

@markcheret
Copy link
Owner

for inspiration: https://gist.github.com/kasparsd/3749872

@markcheret
Copy link
Owner

for inspiration: https://github.com/kasparsd/wp-deploy

@markcheret
Copy link
Owner

once #88 is alive and well... wanna hop on a call and tackle this together? @Rumperuu

@Rumperuu
Copy link
Collaborator Author

once #88 is alive and well... wanna hop on a call and tackle this together? @Rumperuu

Can do. I'm hoping to get it done over the weekend, if not earlier.

@markcheret
Copy link
Owner

F YEAH!
bitmoji

@Rumperuu
Copy link
Collaborator Author

Rumperuu commented Apr 16, 2021

Currently, @markcheret @lolzim and I all have SVN commit access, so bespoke credentials are unnecessary. Definitely one to review later though, as that approach won't scale if the team grows.

@lolzim
Copy link
Contributor

lolzim commented Apr 16, 2021

And we hope it'll grow :)

@markcheret
Copy link
Owner

It sure will.
Fair enough regarding the release credentials.

@markcheret
Copy link
Owner

I have added my SVN credentials to the repo as GitHub repo secrets. Named as referenced in the release_handler.yml

@markcheret
Copy link
Owner

@Rumperuu I saw that easy-footnotes is also hosted here on GH and using the same GH action (I believe) to deploy to WP. https://github.com/jasonyingling/easy-footnotes/blob/master/.github/workflows/deploy.yml

Can you please enable our deployment/release automation for 3.0 already (on PR)? No matter if it works fully or no...

@markcheret
Copy link
Owner

@Rumperuu to allow our translators to provide translation for the coming version, we need to deploy to the WP SVN as soon as feasible, so people can get started translating the development version.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
workflow Workflow improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants