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

Automate Release (Core) #2574

Merged
merged 28 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from 25 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: 9 additions & 8 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
Fixes #

### Changes proposed in this Pull Request
### Changes Proposed in this Pull Request

*

### Testing instructions
### Testing Instructions

*

<!-- Add the following only if there are new/updated actions or filters. Please provide a brief description of what they do and any arguments they may take. Be sure to also add the "Hooks" label to this PR. -->
### New/Updated Hooks
<!-- Add changelog entries meant for end-users. Leave empty to skip changelog. Delete section to use PR title. -->
### Release Notes

*

### New or Updated Hooks and Templates
<!-- Add notes for developers on hook/template changes. Add the following only if there are new/updated actions or filters. Please provide a brief description of what they do and any arguments they may take. Be sure to also add the "Hooks" label to this PR. -->

*

Expand All @@ -18,8 +23,4 @@ Fixes #

*

<!--
Helpful tips for screenshots:
https://en.support.wordpress.com/make-a-screenshot/
-->
fjorgemota marked this conversation as resolved.
Show resolved Hide resolved
### Screenshot / Video
52 changes: 52 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Create Plugin Release

on:
pull_request:
types:
- closed
branches:
- 'trunk'

jobs:
deploy:
if: github.event.pull_request.merged == true && startsWith( github.head_ref, 'release/' )
runs-on: ubuntu-latest
name: WPJM Release
steps:
- name: Comment on PR
env:
GITHUB_TOKEN: ${{ github.token }}
run: gh pr comment ${{ github.event.number }} --body "🚀 Starting release ..."
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
tools: composer
coverage: none
- name: Install JS dependencies
run: npm ci
- name: Install PHP dependencies
run: composer install --no-ansi --no-interaction --prefer-dist --no-progress
- name: Setup Git
run: |
git config user.name "WPJM Bot"
git config user.email "<robot@wpjobmanager.com>"
- name: Create Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
node scripts/create-release.mjs wp-job-manager ${{ github.event.number }}
unzip -q wp-job-manager.zip
- name: Deploy to WordPress.org
uses: 10up/action-wordpress-plugin-deploy@stable
Copy link
Member

Choose a reason for hiding this comment

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

I think it would be cool to use a fork inside the Automattic org for this.

Just to avoid possible security issues.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

10up is a pretty reputable company and an Automattic partner, so I think it should be safe enough / not worth maintaining a fork.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is @stable the latest version? Would it be possible to at least use a specific version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pinned this down to a commit hash in e1cf715

with:
dry-run: true
env:
SVN_PASSWORD: ${{ secrets.WORDPRESSORG_SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.WORDPRESSORG_SVN_USERNAME }}
BUILD_DIR: wp-job-manager
SLUG: wp-job-manager
- name: Comment on PR
env:
GITHUB_TOKEN: ${{ github.token }}
run: gh pr comment ${{ github.event.number }} --body "✅ Release ${{ github.event.release.tag_name }} deployed to WordPress.org"
Loading
Loading