Streamline the release process with forgejo actions (#74)
Some checks failed
PHP Code Checker / PHP Code Checker (push) Successful in 44s
PHPUnit / PHPUnit – PHP 8.1 (push) Failing after 54s
PHPUnit / PHPUnit – PHP 8.2 (push) Failing after 51s
PHPUnit / PHPUnit – PHP 8.3 (push) Failing after 53s

Also the .zip release files will only contain the needed production code, no development artifacts or tests.

Reviewed-on: #74
Co-authored-by: André Menrath <andre.menrath@posteo.de>
Co-committed-by: André Menrath <andre.menrath@posteo.de>
This commit is contained in:
André Menrath 2024-10-29 21:12:59 +01:00 committed by André Menrath
parent 03026aea03
commit 37bd66ee9b
7 changed files with 50 additions and 21 deletions

View file

@ -1,34 +1,24 @@
.distignore .distignore
.git .git
.gitignore .gitignore
.php_cs
.svnignore
.wordpress-org .wordpress-org
.wp-env.json .wp-env.json
_config.yml
_site
bin bin
CHANGELOG.md CHANGELOG.md
CODE_OF_CONDUCT.md CODE_OF_CONDUCT.md
composer.json composer.json
composer.lock composer.lock
docker-compose.yml
Dockerfile Dockerfile
docs docs
docker-compose-test.yml
docker-compose.yml
FEDERATION.md FEDERATION.md
Gruntfile.js Gruntfile.js
Makefile
node_modules node_modules
npm-debug.log
package-lock.json
package.json package.json
package-lock.json
phpcs.xml phpcs.xml
phpunit.xml phpunit.xml
phpunit.xml.dist
README.md README.md
readme.md
SECURITY.md
src src
tests tests
vendor vendor

View file

@ -0,0 +1,16 @@
on:
push:
tags: 'v*'
jobs:
upload-release:
runs-on: ubuntu-latest
steps:
- uses: https://code.forgejo.org/actions/checkout@v4
- uses: https://code.forgejo.org/actions/forgejo-release@v2
with:
direction: upload
url: https://code.event-federation.eu
release-notes: ${{ TAG }}
token: ${{ secrets.GITHUB_TOKEN }}

23
.gitattributes vendored Normal file
View file

@ -0,0 +1,23 @@
.distignore export-ignore
.forgejo export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.wp-env.json export-ignore
bin export-ignore
CODE_OF_CONDUCT.md export-ignore
composer.json export-ignore
composer.lock export-ignore
docker-compose.yml export-ignore
Dockerfile export-ignore
docs export-ignore
FEDERATION.md export-ignore
Gruntfile.js export-ignore
node_modules export-ignore
package.json export-ignore
package-lock.json export-ignore
phpcs.xml export-ignore
phpunit.xml export-ignore
README.md export-ignore
src export-ignore
tests export-ignore
vendor export-ignore

View file

@ -8,10 +8,10 @@
* Author URI: https://graz.social/@linos * Author URI: https://graz.social/@linos
* Text Domain: activitypub-event-bridge * Text Domain: activitypub-event-bridge
* License: AGPL-3.0-or-later * License: AGPL-3.0-or-later
* License URI: https://www.gnu.org/licenses/agpl-3.0.de.html * License URI: https://www.gnu.org/licenses/agpl-3.0.html
* Requires PHP: 8.1 * Requires PHP: 8.1
* *
* Requires at least ActivityPub plugin with version >= 3.2.2. ActivityPub plugin tested up to: 3.3.3. * Requires at least ActivityPub plugin with version >= 3.2.2. ActivityPub plugin tested up to: 4.0.1.
* *
* @package ActivityPub_Event_Bridge * @package ActivityPub_Event_Bridge
* @license AGPL-3.0-or-later * @license AGPL-3.0-or-later

View file

@ -47,7 +47,7 @@ class Health_Check {
*/ */
public static function test_event_transformation() { public static function test_event_transformation() {
$result = array( $result = array(
'label' => \__( 'Transformation of Events to a valid ActivityStreams representation.', 'activitypub' ), 'label' => \__( 'Transformation of Events to a valid ActivityStreams representation.', 'activitypub-event-bridge' ),
'status' => 'good', 'status' => 'good',
'badge' => array( 'badge' => array(
'label' => \__( 'ActivityPub Event Bridge', 'activitypub-event-bridge' ), 'label' => \__( 'ActivityPub Event Bridge', 'activitypub-event-bridge' ),
@ -172,7 +172,7 @@ class Health_Check {
'label' => __( 'ActivityPub Event Bridge', 'activitypub-event-bridge' ), 'label' => __( 'ActivityPub Event Bridge', 'activitypub-event-bridge' ),
'fields' => array( 'fields' => array(
'plugin_version' => array( 'plugin_version' => array(
'label' => __( 'Plugin Version', 'activitypub' ), 'label' => __( 'Plugin Version', 'activitypub-event-bridge' ),
'value' => ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_VERSION, 'value' => ACTIVITYPUB_EVENT_BRIDGE_PLUGIN_VERSION,
'private' => true, 'private' => true,
), ),

View file

@ -44,7 +44,7 @@ class Settings {
'activitypub_event_bridge_default_event_category', 'activitypub_event_bridge_default_event_category',
array( array(
'type' => 'string', 'type' => 'string',
'description' => \__( 'Define your own custom post template', 'activitypub' ), 'description' => \__( 'Define your own custom post template', 'activitypub-event-bridge' ),
'show_in_rest' => true, 'show_in_rest' => true,
'default' => self::DEFAULT_EVENT_CATEGORY, 'default' => self::DEFAULT_EVENT_CATEGORY,
'sanitize_callback' => array( self::class, 'sanitize_mapped_event_category' ), 'sanitize_callback' => array( self::class, 'sanitize_mapped_event_category' ),
@ -56,7 +56,7 @@ class Settings {
'activitypub_event_bridge_event_category_mappings', 'activitypub_event_bridge_event_category_mappings',
array( array(
'type' => 'array', 'type' => 'array',
'description' => \__( 'Define your own custom post template', 'activitypub' ), 'description' => \__( 'Define your own custom post template', 'activitypub-event-bridge' ),
'default' => array(), 'default' => array(),
'sanitize_callback' => array( self::class, 'sanitize_event_category_mappings' ), 'sanitize_callback' => array( self::class, 'sanitize_event_category_mappings' ),
) )
@ -67,7 +67,7 @@ class Settings {
'activitypub_event_bridge_initially_activated', 'activitypub_event_bridge_initially_activated',
array( array(
'type' => 'boolean', 'type' => 'boolean',
'description' => \__( 'Whether the plugin just got activated for the first time.', 'activitypub' ), 'description' => \__( 'Whether the plugin just got activated for the first time.', 'activitypub-event-bridge' ),
'default' => 1, 'default' => 1,
) )
); );

View file

@ -285,7 +285,7 @@ class Setup {
foreach ( $this->active_event_plugins as $event_plugin ) { foreach ( $this->active_event_plugins as $event_plugin ) {
if ( ! in_array( $event_plugin->get_post_type(), $activitypub_supported_post_types, true ) ) { if ( ! in_array( $event_plugin->get_post_type(), $activitypub_supported_post_types, true ) ) {
$activitypub_supported_post_types[] = $event_plugin->get_post_type(); $activitypub_supported_post_types[] = $event_plugin->get_post_type();
add_post_type_support( $event_plugin->get_post_type(), 'activitypub' ); add_post_type_support( $event_plugin->get_post_type(), 'activitypub-event-bridge' );
} }
} }
update_option( 'activitypub_support_post_types', $activitypub_supported_post_types ); update_option( 'activitypub_support_post_types', $activitypub_supported_post_types );