From 928fb690aed73a062df60ae35d83bf57002f31f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Tue, 31 Dec 2024 11:06:49 +0100 Subject: [PATCH] Add CI for deployment to WordPress.org (#91) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-on: https://code.event-federation.eu/Event-Federation/wordpress-event-bridge-for-activitypub/pulls/91 Co-authored-by: André Menrath Co-committed-by: André Menrath --- .distignore | 1 - .forgejo/workflows/assets.yml | 21 +++++++++++++++++++++ .forgejo/workflows/deploy.yml | 21 +++++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 .forgejo/workflows/assets.yml create mode 100644 .forgejo/workflows/deploy.yml diff --git a/.distignore b/.distignore index 471f8fb..4754d34 100644 --- a/.distignore +++ b/.distignore @@ -4,7 +4,6 @@ .wordpress-org .wp-env.json bin -CHANGELOG.md CODE_OF_CONDUCT.md composer.json composer.lock diff --git a/.forgejo/workflows/assets.yml b/.forgejo/workflows/assets.yml new file mode 100644 index 0000000..b278404 --- /dev/null +++ b/.forgejo/workflows/assets.yml @@ -0,0 +1,21 @@ +name: Plugin asset/readme update on WordPress.org + +on: + push: + branches: + - main + +jobs: + trunk: + name: Push assets to trunk on WordPress.org + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: https://code.forgejo.org/actions/checkout@v4 + + - name: WordPress.org plugin asset/readme update + uses: https://github.com/10up/action-wordpress-plugin-asset-update@stable + env: + SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} + SVN_USERNAME: ${{ secrets.SVN_USERNAME }} + SLUG: event-bridge-for-activitypub diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml new file mode 100644 index 0000000..01aa83d --- /dev/null +++ b/.forgejo/workflows/deploy.yml @@ -0,0 +1,21 @@ +name: Deploy to WordPress.org + +on: + push: + tags: + - "v*" + +jobs: + tag: + name: New tag + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: https://code.forgejo.org/actions/checkout@v4 + + - name: WordPress Plugin Deploy + uses: https://github.com/10up/action-wordpress-plugin-deploy@stable + env: + SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} + SVN_USERNAME: ${{ secrets.SVN_USERNAME }} + SLUG: event-bridge-for-activitypub