GatherPress / gatherpress

Powering our community's event management needs.
https://wordpress.org/plugins/gatherpress/
GNU General Public License v2.0
84 stars 31 forks source link

Introduce “wporg-replace” action to update version numbers #924

Open carstingaxion opened 3 days ago

carstingaxion commented 3 days ago

Is your enhancement related to a problem? Please describe.

Currently the important version numbers are updated and changed by a custom cli script.

@mauteri and I want to test if it could be more reliable to use an established workflow by, @sc0ttkclark, a well-known member of the WordPress community.

https://github.com/sc0ttkclark/wporg-replace

Designs

It needs to be tested if this workflow could handle all of GatherPress’ needs:

.
├── .github
│   └── workflows
│       ├── coding-standards.yml
│       ├── phpunit-tests.yml
│       ├── sonarcloud.yml
│       └── wporg-replace.yml (The workflow needs no replacement)
├── composer.json
├── package.json
├── phpcs.ruleset.xml
├── readme.md
└── gatherpress.php

Describe alternatives you've considered

No response

Code of Conduct

sc0ttkclark commented 3 days ago

Here's an example of how I'm using that with Pods:

https://github.com/pods-framework/pods/blob/main/.github/workflows/wporg-update-versions.yml

sc0ttkclark commented 3 days ago

Happy to help in any way for y'all.

carstingaxion commented 2 days ago

Happy to help in any way for y'all.

Thank you for looking around and your kind words @sc0ttkclark !

carstingaxion commented 2 days ago

I created a test repo, where I placed all files in, that should in best be handled by the script (or the workflow).

Unfortunately wporg-replace is still hardly requesting for a readme.txt file.

> wporg-replace-helper@1.0.1 wporg-replace-stable-tag
> replace 'Stable tag:(\s*)([\.\d\w\-]*)
> ' "Stable tag:\$1$npm_config_plugin_version
> " $npm_config_plugin_path/readme.txt

node:internal/fs/utils:347
    throw err;
    ^
Error: ENOENT: no such file or directory, lstat '/home/runner/work/test-wporg-replace/test-wporg-replace/readme.txt'

Would you please have look over here @sc0ttkclark ? https://github.com/carstingaxion/test-wporg-replace/actions/runs/11077061381/job/30781510497

carstingaxion commented 2 days ago

And allow me to ask @sc0ttkclark, if it is or could be made possible, to handle other files as well, like a composer.json or even some workflow files. I updated the PR description with a list of all files, that needs to be changed.