Skip to content

Commit 8119eb7

Browse files
authored
Merge pull request #17 from threadi/feature/addGitHubAction
Feature/add GitHub action
2 parents 6053ceb + 5dada66 commit 8119eb7

File tree

4 files changed

+145
-33
lines changed

4 files changed

+145
-33
lines changed

.github/workflows/build-zip.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Build release zip
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
build:
10+
name: Build release zip
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Setup WP-CLI
17+
uses: godaddy-wordpress/setup-wp-cli@1
18+
19+
- name: Run package installs and builds
20+
run: |
21+
composer install
22+
composer update
23+
24+
- name: Run WordPress Coding Standard fixes
25+
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 .
26+
27+
- name: Run WordPress Coding Standard checks
28+
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 .
29+
30+
- name: Set version number 1
31+
uses: richardrigutins/replace-in-files@v2
32+
with:
33+
files: 'auto-category-for-posts.php'
34+
search-text: '@@VersionNumber@@'
35+
replacement-text: ${{ github.ref_name }}
36+
37+
- name: Set version number 2
38+
uses: richardrigutins/replace-in-files@v2
39+
with:
40+
files: 'readme.txt'
41+
search-text: '@@VersionNumber@@'
42+
replacement-text: ${{ github.ref_name }}
43+
44+
- name: Create ZIP release
45+
run: |
46+
rm -fr assets
47+
rm -fr build
48+
rm -fr releases
49+
rm -fr languages
50+
rm -fr changelog.md
51+
rm -fr svn
52+
rm readme.md
53+
cd ..
54+
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"
55+
cp ${{ github.event.repository.name }}_${{ github.ref_name }}.zip ${{ github.event.repository.name }}/
56+
57+
- name: Create Release
58+
uses: softprops/action-gh-release@v2
59+
if: startsWith(github.ref, 'refs/tags/')
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
with:
63+
files: ${{ github.event.repository.name }}_${{ github.ref_name }}.zip

changelog.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Changelog
2+
3+
## [1.0.9] - 22.12.2024
4+
5+
### Added
6+
7+
- Added GitHub action to build releases
8+
9+
### Changed
10+
11+
- Moved the changelog to GitHub
12+
13+
## [1.0.8] - 16.03.2024
14+
15+
### Changed
16+
17+
- Small optimizations
18+
- Removed JSON-language files from plugin
19+
- Updated compatibility-flag for WordPress 6.5
20+
21+
22+
## [1.0.7] - 21.10.2023
23+
24+
### Changed
25+
26+
- Updated compatibility-flag for WordPress 6.4
27+
- Compatible with WordPress Coding Standards 3.0
28+
29+
### Removed
30+
31+
- Removed language-files from plugin (except the json-files for Block Editor)
32+
33+
## [1.0.6] - 16.07.2023
34+
35+
### Changed
36+
37+
- Updated compatibility-flag for WordPress 6.3
38+
- Compatible with WordPress Coding Standards
39+
40+
## [1.0.5] - 19.03.2023
41+
42+
### Changed
43+
44+
- Updated compatibility-flag for WordPress 6.2
45+
46+
## [1.0.4] - 16.07.2022
47+
48+
### Changed
49+
50+
- Updated compatibility-flag for WordPress 6.0.1
51+
- Added build-system for repository
52+
53+
## [1.0.3] - 21.05.2022
54+
55+
### Changed
56+
57+
- Updated compatibility-flag for WordPress 6.0
58+
59+
## [1.0.2] - 09.02.2022
60+
61+
### Fixed
62+
63+
- Security fix for AJAX-requests
64+
65+
## [1.0.1] - 09.02.2022
66+
67+
### Changed
68+
69+
- Using default_category instead of own option
70+
71+
## [1.0.0] - 04.02.2022
72+
73+
### Added
74+
75+
- Initial commit

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "threadi/auto-category-for-posts",
3+
"version": "1.0.0",
34
"require-dev": {
45
"wp-coding-standards/wpcs": "^3.0.0"
56
},

readme.txt

Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
Contributors: threadi
33
Tags: category, auto category, posts
44
Requires at least: 5.8
5-
Tested up to: 6.6
5+
Tested up to: 6.7
66
Requires PHP: 7.4
77
License: GPL-2.0-or-later
88
License URI: https://www.gnu.org/licenses/gpl-2.0.html
9-
Stable tag: 1.0.8
9+
Stable tag: @@VersionNumber@@
1010

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

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

2323
== Changelog ==
2424

25-
= 1.0.0 =
26-
* Initial commit
25+
= 1.0.9 =
26+
* Added GitHub action to build releases
27+
* Move this changelog to GitHub
2728

28-
= 1.0.1 =
29-
* Using default_category instead of own option
30-
31-
= 1.0.2 =
32-
* Security fix for AJAX-requests
33-
34-
= 1.0.3 =
35-
* Updated compatibility-flag for WordPress 6.0
36-
37-
= 1.0.4 =
38-
* Updated compatibility-flag for WordPress 6.0.1
39-
* Added build-system for repository
40-
41-
= 1.0.5 =
42-
* Updated compatibility-flag for WordPress 6.2
43-
44-
= 1.0.6 =
45-
* Updated compatibility-flag for WordPress 6.3
46-
* Compatible with WordPress Coding Standards
47-
48-
= 1.0.7 =
49-
* Updated compatibility-flag for WordPress 6.4
50-
* Compatible with WordPress Coding Standards 3.0
51-
* Removed language-files from plugin (except the json-files for Block Editor)
52-
53-
= 1.0.8 =
54-
* Small optimizations
55-
* Removed JSON-language files from plugin
56-
* Updated compatibility-flag for WordPress 6.5
29+
[older changes](https://github.com/threadi/auto-category-for-posts/blob/master/changelog.md)

0 commit comments

Comments
 (0)