-
Notifications
You must be signed in to change notification settings - Fork 14
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 GitHub Actions workflow for automatic publishing #44
Conversation
f148bda
to
984a069
Compare
984a069
to
31fb4f4
Compare
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "hypothesis", | |||
"version": "0.4.8", | |||
"version": "0.6.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was outdated, but it's not really used at the moment.
uses: 10up/action-wordpress-plugin-deploy@stable | ||
env: | ||
SVN_USERNAME: ${{ secrets.WP_SVN_USERNAME }} | ||
SVN_PASSWORD: ${{ secrets.WP_SVN_PASSWORD }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
31fb4f4
to
0b496f0
Compare
@@ -4,7 +4,7 @@ | |||
* Plugin URI: https://hypothes.is/ | |||
* Description: Hypothesis is an open platform for the collaborative evaluation of knowledge. This plugin embeds the necessary scripts in your WordPress site to enable any user to use Hypothesis without installing any extensions. | |||
* Version: 0.6.0 | |||
* Requires at least: 6.0 | |||
* Requires at least: 6.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can see, many popular plugins support the latest 3 minor versions, which are 6.2, 6.3 and 6.4
README.md
Outdated
Follow these steps to publish a new plugin version. | ||
|
||
1. **Update the package version** in `hypothesis.php`, `readme.txt` and `package.json`, and merge that change into the `main` branch[^1]. We use [Semantic Versioning](https://semver.org/#semantic-versioning-200). | ||
2. **Create a tag** pointing at the version-change commit and generate a **new GitHub release** (details follow). Publishing a GitHub release will kick off a GitHub Action that will publish the plugin to wordpress.org | ||
|
||
### Creating a GitHub release | ||
|
||
Create a [new GitHub release](https://github.com/hypothesis/frontend-shared/releases/new/) with these values: | ||
|
||
1. _Tag_: Create a new tag for the release, targeting the `main` branch (your just-merged version bump should be at the tip)[^2]. The tag should match the version number, e.g. `v5.2.1`. | ||
2. _Title_: Use the tag name. | ||
3. Click the `Auto-generate release notes` button to generate release notes and edit as needed. We use [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) formatting.[^3] | ||
4. Leave other fields alone/as defaults. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took this from frontend-shared. The only difference is that the version needs to be edited in hypothesis.php
and readme.txt
.
0b496f0
to
bf43fc0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not much to say, looks good 👍
bf43fc0
to
5e39d25
Compare
Part of #40
Closes #39
Add a new GitHub actions workflow that triggers for every new release, and publishes the plugin to wordpress.org using https://github.com/10up/action-wordpress-plugin-deploy. This seems to be the de-facto GitHub Action to publish WordPress plugins.
Additionally, remove the custom scripts previously used for building and publishing.
TODO