Skip to content

Commit

Permalink
Merge branch 'develop' into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdharmesh committed Dec 7, 2022
2 parents 2d01601 + 1214986 commit 9ccd6e6
Show file tree
Hide file tree
Showing 20 changed files with 21,447 additions and 15,833 deletions.
1 change: 1 addition & 0 deletions .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ README.md
webpack.config.js
webpack.gutenberg.config.js
.wp-env.json
.nvmrc
57 changes: 57 additions & 0 deletions .github/workflows/build-release-zip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Build release zip

on:
workflow_dispatch:
push:
branches:
- trunk

jobs:
build:
name: Build release zip
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Cache vendor
id: cache-composer
uses: actions/cache@v3
env:
cache-name: cache-vendor
with:
path: |
vendor
~/.composer/cache
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}

- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}

- name: Setup node version and npm cache
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'

- name: Install Node dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm install

- name: Install Composer dependencies
if: steps.cache-vendor.outputs.cache-hit != 'true'
run: composer install --no-dev

- name: Build plugin
run: |
npm run build
npm run build:externals
- name: Generate ZIP file
uses: 10up/action-wordpress-plugin-build-zip@stable
2 changes: 1 addition & 1 deletion .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
core:
- { name: 'WP latest', version: 'latest' }
- { name: 'WP trunk', version: 'WordPress/WordPress#master' }
- { name: 'WP minimum', version: 'WordPress/WordPress#5.3' }
- { name: 'WP minimum', version: 'WordPress/WordPress#5.7' }

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: install node v16
uses: actions/setup-node@v3
with:
node-version: 16
node-version-file: '.nvmrc'
- name: npm install
run: npm install
- name: Run eslint
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/php-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
php_compatibility:
name: PHP minimum 7.2
name: PHP minimum 7.4
runs-on: ubuntu-latest

steps:
Expand All @@ -21,15 +21,12 @@ jobs:
- name: Set PHP version
uses: shivammathur/setup-php@v2
with:
php-version: 7.2
php-version: 7.4
tools: composer:v2
coverage: none

- name: Remove non-production dependencies
run: rm composer.lock && composer remove --dev phpunit/phpunit yoast/phpunit-polyfills

- name: Install dependencies
run: composer install

- name: Run PHP Compatibility
run: vendor/bin/phpcs autoshare-for-twitter.php includes/ --standard=PHPCompatibilityWP --extensions=php --runtime-set testVersion 7.2-
run: vendor/bin/phpcs autoshare-for-twitter.php includes/ --standard=PHPCompatibilityWP --extensions=php --runtime-set testVersion 7.4-
2 changes: 1 addition & 1 deletion .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set PHP version
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
php-version: '7.4'
tools: composer:v2
coverage: none

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: ['7.3', '8.0']
php-versions: ['7.4', '8.0']

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set PHP version
uses: shivammathur/setup-php@v1
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/pr-automator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: 'PR Automator'
on:
pull_request:
types:
- opened
- edited
- converted_to_draft
- ready_for_review
branches:
- develop

jobs:
Validate:
runs-on: ubuntu-latest
steps:
- uses: 10up/action-pr-automator@trunk
with:
fail-label: needs:feedback
pass-label: needs:code-review
reviewer: iamdharmesh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20 changes: 20 additions & 0 deletions .github/workflows/wordpress-latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "WordPress version checker"
on:
push:
branches:
- develop
- trunk
pull_request:
branches:
- develop
schedule:
- cron: '0 0 * * 1'

jobs:
wordpress-version-checker:
runs-on: ubuntu-latest
steps:
- name: WordPress version checker
uses: skaut/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16
25 changes: 23 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,35 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased] - TBD

## [1.2.1] - 2022-12-05
**Note that this release bumps the WordPress minimum from 5.3 to 5.7 and PHP minimum from 7.2 to 7.4.**

### Added
- "PR Automator" GitHub Action (props [@iamdharmesh](https://github.com/iamdharmesh), [@Sidsector9](https://github.com/Sidsector9), [@jeffpaul](https://github.com/jeffpaul) via [#194](https://github.com/10up/autoshare-for-twitter/pull/194), [#196](https://github.com/10up/autoshare-for-twitter/pull/196)).
- "Build release zip" GitHub Action (props [@iamdharmesh](https://github.com/iamdharmesh), [@dkotter](https://github.com/dkotter) via [#201](https://github.com/10up/autoshare-for-twitter/pull/201)).

### Changed
- Bump minimum `PHP` version from 7.2 to 7.4 (props [@Sidsector9](https://github.com/Sidsector9), [@iamdharmesh](https://github.com/iamdharmesh), [@vikrampm1](https://github.com/vikrampm1) via [#197](https://github.com/10up/autoshare-for-twitter/pull/197)).
- Bump minimum `WordPress` version from 5.3 to 5.7 (props [@Sidsector9](https://github.com/Sidsector9), [@iamdharmesh](https://github.com/iamdharmesh), [@vikrampm1](https://github.com/vikrampm1) via [#197](https://github.com/10up/autoshare-for-twitter/pull/197)).
- Bump WordPress "tested up to" version 6.1 (props [@iamdharmesh](https://github.com/iamdharmesh), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#200](https://github.com/10up/autoshare-for-twitter/pull/200)).
- Support Level from `Active` to `Stable` (props [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter) via [#195](https://github.com/10up/autoshare-for-twitter/pull/195)).

### Security
- Bump `json-schema` from 0.2.3 to 0.4.0 (props [@dependabot](https://github.com/apps/dependabot), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#189](https://github.com/10up/autoshare-for-twitter/pull/189)).
- Bump `jsprim` from 1.4.1 to 1.4.2 (props [@dependabot](https://github.com/apps/dependabot), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#189](https://github.com/10up/autoshare-for-twitter/pull/189)).
- Bump `simple-git` from 2.47.0 to 3.14.1 (props [@dependabot](https://github.com/apps/dependabot), [@iamdharmesh](https://github.com/iamdharmesh) via [#192](https://github.com/10up/autoshare-for-twitter/pull/192)).
- Bump `@wordpress/env` from 4.1.3 to 5.3.0 (props [@dependabot](https://github.com/apps/dependabot), [@iamdharmesh](https://github.com/iamdharmesh), [@faisal-alvi](https://github.com/faisal-alvi) via [#191](https://github.com/10up/autoshare-for-twitter/pull/191), [#192](https://github.com/10up/autoshare-for-twitter/pull/192)).
- Bump `got` from 10.7.0 to 11.8.5 (props [@dependabot](https://github.com/apps/dependabot), [@faisal-alvi](https://github.com/faisal-alvi) via [#191](https://github.com/10up/autoshare-for-twitter/pull/191)).

## [1.2.0] - 2022-09-28
**Note that this release bumps the WordPress minimum from 4.9 to 5.3.**

### Added
- Add AutoTweet panel in editor sidebar and pre-publish panel to manage enabling/disabling tweet on publish (props [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul), [@linawiezkowiak](https://github.com/linawiezkowiak), [@oszkarnagy](https://github.com/oszkarnagy), [@cadic](https://github.com/cadic) via [#177](https://github.com/10up/autoshare-for-twitter/pull/177)).
- AutoTweet panel in editor sidebar and pre-publish panel to manage enabling/disabling tweet on publish (props [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul), [@linawiezkowiak](https://github.com/linawiezkowiak), [@oszkarnagy](https://github.com/oszkarnagy), [@cadic](https://github.com/cadic) via [#177](https://github.com/10up/autoshare-for-twitter/pull/177)).

### Changed
- Bump minimum required WordPress version to 5.3 (props [@iamdharmesh](https://github.com/iamdharmesh) via [#177](https://github.com/10up/autoshare-for-twitter/pull/177)).
- Updates in CONTRIBUTING.md file (props [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul) via [#172](https://github.com/10up/autoshare-for-twitter/pull/172)).
- Updates in `CONTRIBUTING.md` file (props [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul) via [#172](https://github.com/10up/autoshare-for-twitter/pull/172)).
- Update plugin icons (props [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul) via [#174](https://github.com/10up/autoshare-for-twitter/pull/174)).

### Security
Expand Down Expand Up @@ -139,6 +159,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Initial closed source release (props [@scottlee](https://github.com/scottlee/)).

[Unreleased]: https://github.com/10up/autoshare-for-twitter/compare/trunk...develop
[1.2.1]: https://github.com/10up/autoshare-for-twitter/compare/1.2.0...1.2.1
[1.2.0]: https://github.com/10up/autoshare-for-twitter/compare/1.1.2...1.2.0
[1.1.2]: https://github.com/10up/autoshare-for-twitter/compare/1.1.1...1.1.2
[1.1.1]: https://github.com/10up/autoshare-for-twitter/compare/1.1.0...1.1.1
Expand Down
25 changes: 13 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,16 @@ The develop branch is the development branch which means it contains the next ve
## Release instructions

1. Branch: Starting from `develop`, cut a release branch named `release/X.Y.Z` for your changes.
1. Version bump: Bump the version number in `autoshare-for-twitter.php`, `readme.txt`, `package-lock.json`, `package.json`, and `composer.json`(`autoloader-suffix` config option) if it does not already reflect the version being released. In `autoshare-for-twitter.php` update both the plugin "Version:" property and the plugin `AUTOSHARE_FOR_TWITTER_VERSION` constant.
1. Changelog: Add/update the changelog in `CHANGELOG.md` and `readme.txt`.
1. Props: update `CREDITS.md` file with any new contributors, confirm maintainers are accurate.
1. New files: Check to be sure any new files/paths that are unnecessary in the production version are included in `.distignore`.
1. Readme updates: Make any other readme changes as necessary. `README.md` is geared toward GitHub and `readme.txt` contains WordPress.org-specific content. The two are slightly different.
1. Merge: Make a non-fast-forward merge from your release branch to `develop` (or merge the pull request), then do the same for `develop` into `trunk` (`git checkout trunk && git merge --no-ff develop`). `trunk` contains the stable development version.
1. Push: Push your `trunk` branch to GitHub (e.g. `git push origin trunk`).
1. Release: Create a [new release](https://github.com/10up/autoshare-for-twitter/releases/new), naming the tag and the release with the new version number, and targeting the `trunk` branch. Paste the changelog from `CHANGELOG.md` into the body of the release and include a link to the [closed issues on the milestone](https://github.com/10up/autoshare-for-twitter/milestone/#?closed=1).
1. SVN: Wait for the [GitHub Action](https://github.com/10up/autoshare-for-twitter/actions/workflows/deploy-to-wpdotorg.yml) to finish deploying to the WordPress.org repository. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes.
1. Check WordPress.org: Ensure that the changes are live on https://wordpress.org/plugins/autoshare-for-twitter/. This may take a few minutes.
1. Close the milestone: Edit the [milestone](https://github.com/10up/autoshare-for-twitter/milestone/#) with release date (in the `Due date (optional)` field) and link to GitHub release (in the `Description` field), then close the milestone.
1. 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+1.0.0`, `X.Y+1.0`, `X.Y.Z+1`, or `Future Release`
2. Version bump: Bump the version number in `autoshare-for-twitter.php`, `readme.txt`, `package-lock.json`, `package.json`, and `composer.json`(`autoloader-suffix` config option) if it does not already reflect the version being released. In `autoshare-for-twitter.php` update both the plugin "Version:" property and the plugin `AUTOSHARE_FOR_TWITTER_VERSION` constant.
3. Changelog: Add/update the changelog in `CHANGELOG.md` and `readme.txt`.
4. Props: update `CREDITS.md` file with any new contributors, confirm maintainers are accurate.
5. New files: Check to be sure any new files/paths that are unnecessary in the production version are included in `.distignore`.
6. Readme updates: Make any other readme changes as necessary. `README.md` is geared toward GitHub and `readme.txt` contains WordPress.org-specific content. The two are slightly different.
7. Merge: Make a non-fast-forward merge from your release branch to `develop` (or merge the pull request), then do the same for `develop` into `trunk` (`git checkout trunk && git merge --no-ff develop`). `trunk` contains the stable development version.
8. Push: Push your `trunk` branch to GitHub (e.g. `git push origin trunk`).
9. Test the pre-release ZIP locally by downloading it from the **Build release zip** action artifact to ensure the plugin doesn't break after release.
10. Release: Create a [new release](https://github.com/10up/autoshare-for-twitter/releases/new), naming the tag and the release with the new version number, and targeting the `trunk` branch. Paste the changelog from `CHANGELOG.md` into the body of the release and include a link to the [closed issues on the milestone](https://github.com/10up/autoshare-for-twitter/milestone/#?closed=1).
11. SVN: Wait for the [GitHub Action](https://github.com/10up/autoshare-for-twitter/actions/workflows/deploy-to-wpdotorg.yml) to finish deploying to the WordPress.org repository. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes.
12. Check WordPress.org: Ensure that the changes are live on https://wordpress.org/plugins/autoshare-for-twitter/. This may take a few minutes.
13. Close the milestone: Edit the [milestone](https://github.com/10up/autoshare-for-twitter/milestone/#) with release date (in the `Due date (optional)` field) and link to GitHub release (in the `Description` field), then close the milestone.
14. 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+1.0.0`, `X.Y+1.0`, `X.Y.Z+1`, or `Future Release`
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> Automatically tweets the post title or custom message and a link to the post.
[![Support Level](https://img.shields.io/badge/support-active-green.svg)](#support-level) [![Release Version](https://img.shields.io/github/release/10up/autoshare-for-twitter.svg)](https://github.com/10up/autoshare-for-twitter/releases/latest) ![WordPress tested up to version](https://img.shields.io/wordpress/plugin/tested/autoshare-for-twitter?label=WordPress) [![GPLv2 License](https://img.shields.io/github/license/10up/autoshare-for-twitter.svg)](https://github.com/10up/autoshare-for-twitter/blob/develop/LICENSE.md)
[![Support Level](https://img.shields.io/badge/support-stable-blue.svg)](#support-level) [![Release Version](https://img.shields.io/github/release/10up/autoshare-for-twitter.svg)](https://github.com/10up/autoshare-for-twitter/releases/latest) ![WordPress tested up to version](https://img.shields.io/wordpress/plugin/tested/autoshare-for-twitter?label=WordPress) [![GPLv2 License](https://img.shields.io/github/license/10up/autoshare-for-twitter.svg)](https://github.com/10up/autoshare-for-twitter/blob/develop/LICENSE.md)
[![ESLint](https://github.com/10up/autoshare-for-twitter/actions/workflows/eslint.yml/badge.svg)](https://github.com/10up/autoshare-for-twitter/actions/workflows/eslint.yml)
[![PHPCompatibility](https://github.com/10up/autoshare-for-twitter/actions/workflows/php-compatibility.yml/badge.svg)](https://github.com/10up/autoshare-for-twitter/actions/workflows/php-compatibility.yml)
[![PHPCS](https://github.com/10up/autoshare-for-twitter/actions/workflows/phpcs.yml/badge.svg)](https://github.com/10up/autoshare-for-twitter/actions/workflows/phpcs.yml)
Expand Down Expand Up @@ -56,8 +56,8 @@ add_filter( 'dt_blacklisted_meta', function( $blacklisted_metas ) {

## Requirements

- PHP 7.2+
- [WordPress](http://wordpress.org) 5.3+
- PHP 7.4+
- [WordPress](http://wordpress.org) 5.7+

## Installation

Expand All @@ -73,7 +73,7 @@ Yes, yes it does! For more details on this, see [#44](https://github.com/10up/au

## Support Level

**Active:** 10up is actively working on this, and we expect to continue work for the foreseeable future including keeping tested up to the most recent version of WordPress. Bug reports, feature requests, questions, and pull requests are welcome.
**Stable:** 10up is not planning to develop any new features for this, but will still respond to bug reports and security concerns. We welcome PRs, but any that include new features should be small and easy to integrate and should not include breaking changes. We otherwise intend to keep this tested up to the most recent version of WordPress.

## Changelog

Expand Down
8 changes: 4 additions & 4 deletions autoshare-for-twitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* Plugin Name: Autoshare for Twitter
* Description: Automatically tweets the post title or custom message and a link to the post.
* Disclaimer: TWITTER, TWEET, RETWEET and the Twitter logo are trademarks of Twitter, Inc. or its affiliates.
* Version: 1.2.0
* Requires at least: 5.3
* Requires PHP: 7.2
* Version: 1.2.1
* Requires at least: 5.7
* Requires PHP: 7.4
* Author: 10up
* Author URI: https://10up.com
* License: GPL-2.0-or-later
Expand All @@ -20,7 +20,7 @@
}

define( 'AUTOSHARE_FOR_TWITTER', __FILE__ );
define( 'AUTOSHARE_FOR_TWITTER_VERSION', '1.2.0' );
define( 'AUTOSHARE_FOR_TWITTER_VERSION', '1.2.1' );
define( 'AUTOSHARE_FOR_TWITTER_URL', plugin_dir_url( __FILE__ ) );
define( 'AUTOSHARE_FOR_TWITTER_PATH', plugin_dir_path( __FILE__ ) );
define( 'AUTOSHARE_FOR_TWITTER_INC', AUTOSHARE_FOR_TWITTER_PATH . 'includes/' );
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"minimum-stability": "dev",
"config": {
"autoloader-suffix": "10upAutoshareForTwitterV120",
"autoloader-suffix": "10upAutoshareForTwitterV121",
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
Expand Down
Loading

0 comments on commit 9ccd6e6

Please sign in to comment.