Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: Deploy

# Run deploy only on published releases.
on:
release:
types: [published]
push:
branches:
# For readme and asset updates.
- master

jobs:

Expand Down Expand Up @@ -32,9 +35,19 @@ jobs:
- name: Build plugin
run: npm run build

- name: WordPress Plugin Deploy
- name: WordPress.org asset and readme update
uses: 10up/action-wordpress-plugin-asset-update@stable
if: github.ref_name == 'master'
env:
# Note: this action doesn't support BUILD_DIR so it pushes the raw readme.txt
IGNORE_OTHER_FILES: true
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This action is inconsistent in two ways

  1. It doesn't support BUILD_DIR so we can't point it to the correct directory of built files (according to our release logic).

  2. It attempts to deploy the un-built source files unless we specify IGNORE_OTHER_FILES which would deploy and invalid release.

SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}

- name: WordPress.org deploy
id: deploy
uses: 10up/action-wordpress-plugin-deploy@stable
if: startsWith( github.ref, 'refs/tags/' )
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This action derives the release VERSION from the tag name so it can't run anywhere else but on tag builds.

with:
generate-zip: true
env:
Expand Down
6 changes: 4 additions & 2 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Release Process

Note that all merges to the `master` branch have the asset directory `.wordpress-org` and `readme.txt` deployed to WordPress.org to avoid creating a new version release when updating only `Tested up to` header or screenshots.

The following content can be copied and pasted into a release issue or PR to help provide a checklist of tasks when releasing this project. When pasting this content, ensure to update any `X.Y.Z` nomenclature to the release version being prepared.

```
Expand All @@ -14,9 +16,9 @@ The following content can be copied and pasted into a release issue or PR to hel
- [ ] Test: Test a ZIP built from the Release PR branch to ensure key plugin functionality continues to work and that the [Tests action](https://github.com/WordPress/two-factor/actions/workflows/test.yml) passes on the PR.
- [ ] Merge: After review approval, merge the release pull request (or make a non-fast-forward merge from your release branch to `master`). `master` contains the latest stable release.
- [ ] Release: Create a [new release](https://github.com/WordPress/two-factor/releases/new), naming the tag and the release with the new version number, and targeting the `master` branch. Paste the changelog from `CHANGELOG.md` into the body of the release and include a link to the [closed items on the milestone](https://github.com/WordPress/two-factor/milestone/##?closed=1). Creating a release will automatically generate & attach zip/tarball files, so you can ignore the GitHub release form asking to uploaded those assets.
- [ ] SVN: Wait for the [GitHub Action: Deploy](https://github.com/WordPress/two-factor/actions/workflows/deploy.yml) to finish deploying to the WordPress.org repository.
- [ ] SVN: Wait for the [GitHub Action: Deploy](https://github.com/WordPress/two-factor/actions/workflows/deploy.yml) to finish deploying to the WordPress.org repository.
- [ ] Release confirmation: Someone with committer access on WP.org needs to confirm the release at https://wordpress.org/plugins/two-factor/advanced/. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes.
- [ ] Check WordPress.org: Ensure that the changes are live on https://wordpress.org/plugins/two-factor/. This may take a few minutes.
- [ ] Close the milestone: Edit the [milestone](https://github.com/10up/simple-local-avatars/milestone/##) with the release date (in the `Due date (optional)` field) and link to the GitHub release (in the `Description` field), then close the milestone.
- [ ] Punt incomplete items: If any open issues or PRs which were milestoned for `X.Y.Z` do not make it into the release, update their milestone to `X.Y.Z+1`, `X.Y+1.0`, `X+1.0.0` or `Future Release`.`
```
```
Loading