Skip to content

Commit

Permalink
Merge pull request #17 from threadi/feature/addGitHubAction
Browse files Browse the repository at this point in the history
Feature/add GitHub action
  • Loading branch information
threadi authored Dec 22, 2024
2 parents 6053ceb + 5dada66 commit 8119eb7
Show file tree
Hide file tree
Showing 4 changed files with 145 additions and 33 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/build-zip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Build release zip

on:
push:
tags:
- '*'

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

- name: Setup WP-CLI
uses: godaddy-wordpress/setup-wp-cli@1

- name: Run package installs and builds
run: |
composer install
composer update
- name: Run WordPress Coding Standard fixes
run: vendor/bin/phpcbf --extensions=php --ignore=*/vendor/*,*/doc/*,*/svn/*,*/node_modules/*,*/gettext-helper.php,*/classes/multilingual-plugins/easy-language/pagebuilder/divi/build/,*/classes/multilingual-plugins/easy-language/blocks/*/build/,*translatepress* --standard=ruleset.xml .

- name: Run WordPress Coding Standard checks
run: vendor/bin/phpcs --extensions=php --ignore=*/vendor/*,*/doc/*,*/svn/*,*/node_modules/*,*/gettext-helper.php,*/classes/multilingual-plugins/easy-language/pagebuilder/divi/build/,*/classes/multilingual-plugins/easy-language/blocks/*/build/,*translatepress* --standard=ruleset.xml .

- name: Set version number 1
uses: richardrigutins/replace-in-files@v2
with:
files: 'auto-category-for-posts.php'
search-text: '@@VersionNumber@@'
replacement-text: ${{ github.ref_name }}

- name: Set version number 2
uses: richardrigutins/replace-in-files@v2
with:
files: 'readme.txt'
search-text: '@@VersionNumber@@'
replacement-text: ${{ github.ref_name }}

- name: Create ZIP release
run: |
rm -fr assets
rm -fr build
rm -fr releases
rm -fr languages
rm -fr changelog.md
rm -fr svn
rm readme.md
cd ..
zip -r -q ${{ github.event.repository.name }}_${{ github.ref_name }}.zip ${{ github.event.repository.name }}/* -x "*/.git/*" "*/.github/*" "*/blocks/*/src/*" "*/doc/*" "*/phpcs.xml" "*/composer.json" "*/composer.lock" "*/package.json" "*/package-lock.json" "*/.gitignore" "*/vendor/*" "*/node_modules/*" "/.editorconfig"
cp ${{ github.event.repository.name }}_${{ github.ref_name }}.zip ${{ github.event.repository.name }}/
- name: Create Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: ${{ github.event.repository.name }}_${{ github.ref_name }}.zip
75 changes: 75 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Changelog

## [1.0.9] - 22.12.2024

### Added

- Added GitHub action to build releases

### Changed

- Moved the changelog to GitHub

## [1.0.8] - 16.03.2024

### Changed

- Small optimizations
- Removed JSON-language files from plugin
- Updated compatibility-flag for WordPress 6.5


## [1.0.7] - 21.10.2023

### Changed

- Updated compatibility-flag for WordPress 6.4
- Compatible with WordPress Coding Standards 3.0

### Removed

- Removed language-files from plugin (except the json-files for Block Editor)

## [1.0.6] - 16.07.2023

### Changed

- Updated compatibility-flag for WordPress 6.3
- Compatible with WordPress Coding Standards

## [1.0.5] - 19.03.2023

### Changed

- Updated compatibility-flag for WordPress 6.2

## [1.0.4] - 16.07.2022

### Changed

- Updated compatibility-flag for WordPress 6.0.1
- Added build-system for repository

## [1.0.3] - 21.05.2022

### Changed

- Updated compatibility-flag for WordPress 6.0

## [1.0.2] - 09.02.2022

### Fixed

- Security fix for AJAX-requests

## [1.0.1] - 09.02.2022

### Changed

- Using default_category instead of own option

## [1.0.0] - 04.02.2022

### Added

- Initial commit
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "threadi/auto-category-for-posts",
"version": "1.0.0",
"require-dev": {
"wp-coding-standards/wpcs": "^3.0.0"
},
Expand Down
39 changes: 6 additions & 33 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
Contributors: threadi
Tags: category, auto category, posts
Requires at least: 5.8
Tested up to: 6.6
Tested up to: 6.7
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Stable tag: 1.0.8
Stable tag: @@VersionNumber@@

Define a default category for each new post before it is saved.

Expand All @@ -22,35 +22,8 @@ Define a default category for each new post before it is saved. This will alread

== Changelog ==

= 1.0.0 =
* Initial commit
= 1.0.9 =
* Added GitHub action to build releases
* Move this changelog to GitHub

= 1.0.1 =
* Using default_category instead of own option

= 1.0.2 =
* Security fix for AJAX-requests

= 1.0.3 =
* Updated compatibility-flag for WordPress 6.0

= 1.0.4 =
* Updated compatibility-flag for WordPress 6.0.1
* Added build-system for repository

= 1.0.5 =
* Updated compatibility-flag for WordPress 6.2

= 1.0.6 =
* Updated compatibility-flag for WordPress 6.3
* Compatible with WordPress Coding Standards

= 1.0.7 =
* Updated compatibility-flag for WordPress 6.4
* Compatible with WordPress Coding Standards 3.0
* Removed language-files from plugin (except the json-files for Block Editor)

= 1.0.8 =
* Small optimizations
* Removed JSON-language files from plugin
* Updated compatibility-flag for WordPress 6.5
[older changes](https://github.com/threadi/auto-category-for-posts/blob/master/changelog.md)

0 comments on commit 8119eb7

Please sign in to comment.