From 990e322595c5bdbbdd4fbdd8398ae7060b634591 Mon Sep 17 00:00:00 2001 From: tijmen Date: Tue, 27 Jan 2026 16:31:28 +0100 Subject: [PATCH 1/5] Added release actions --- .github/workflows/release-soft.yml | 21 ++++++++++++++++ .github/workflows/release.yml | 39 ++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 .github/workflows/release-soft.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release-soft.yml b/.github/workflows/release-soft.yml new file mode 100644 index 00000000..052e1a52 --- /dev/null +++ b/.github/workflows/release-soft.yml @@ -0,0 +1,21 @@ +# action that will update the assets/readme +name: Plugin asset/readme update +on: + pull_request: + branches: + - main + types: + - closed +jobs: + trunk: + if: github.repository == 'tinify/wordpress-plugin' + name: Push to trunk + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Plugin asset/readme update + uses: 10up/action-wordpress-plugin-asset-update@stable + env: + SLUG: + SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} + SVN_USERNAME: ${{ secrets.SVN_USERNAME }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..389bcb40 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,39 @@ +name: Release to Wordpress.org + +on: + release: + types: [published] + +permissions: + contents: write + +jobs: + deploy_to_wp_repository: + if: github.repository == 'tinify/wordpress-plugin' + name: Deploy to WP.org + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.4' + tools: composer + - name: WordPress Plugin Deploy + id: deploy + uses: 10up/action-wordpress-plugin-deploy@stable + with: + generate-zip: true + env: + SLUG: tiny-compress-images + SVN_USERNAME: ${{ secrets.SVN_USERNAME }} + SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} + - name: Upload release asset + uses: softprops/action-gh-release@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + files: ${{ github.workspace }}/tiny-compress-images.zip \ No newline at end of file From 772e0b1eae44a576f645e7827ced0b14e237ae35 Mon Sep 17 00:00:00 2001 From: tijmen Date: Tue, 27 Jan 2026 16:38:03 +0100 Subject: [PATCH 2/5] Run on master branch --- .github/workflows/release-soft.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-soft.yml b/.github/workflows/release-soft.yml index 052e1a52..1821c0e6 100644 --- a/.github/workflows/release-soft.yml +++ b/.github/workflows/release-soft.yml @@ -3,7 +3,7 @@ name: Plugin asset/readme update on: pull_request: branches: - - main + - master types: - closed jobs: From ef7c995327ac3f4400dd121da8df02da8595482c Mon Sep 17 00:00:00 2001 From: tijmen Date: Tue, 27 Jan 2026 16:39:27 +0100 Subject: [PATCH 3/5] Run when merged into master --- .github/workflows/release-soft.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/release-soft.yml b/.github/workflows/release-soft.yml index 1821c0e6..17553c21 100644 --- a/.github/workflows/release-soft.yml +++ b/.github/workflows/release-soft.yml @@ -1,11 +1,9 @@ # action that will update the assets/readme name: Plugin asset/readme update on: - pull_request: + push: branches: - master - types: - - closed jobs: trunk: if: github.repository == 'tinify/wordpress-plugin' From 258d348ef2806e414a6fa4769a0dd6a4418ab491 Mon Sep 17 00:00:00 2001 From: tijmen Date: Wed, 28 Jan 2026 08:49:19 +0100 Subject: [PATCH 4/5] Remove setup php, not required for release workflow --- .github/workflows/release.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 389bcb40..6cb405a3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,11 +17,6 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '8.4' - tools: composer - name: WordPress Plugin Deploy id: deploy uses: 10up/action-wordpress-plugin-deploy@stable From 0e052bd8b93fe1ca5df3b9cd49c4b35f50f079a4 Mon Sep 17 00:00:00 2001 From: tijmen Date: Wed, 28 Jan 2026 08:52:51 +0100 Subject: [PATCH 5/5] Use tinify forked actions --- .github/workflows/release-soft.yml | 6 +++--- .github/workflows/release.yml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-soft.yml b/.github/workflows/release-soft.yml index 17553c21..2ddf3fe8 100644 --- a/.github/workflows/release-soft.yml +++ b/.github/workflows/release-soft.yml @@ -1,4 +1,4 @@ -# action that will update the assets/readme +# on commit to master will update the assets/readme name: Plugin asset/readme update on: push: @@ -12,8 +12,8 @@ jobs: steps: - uses: actions/checkout@v4 - name: Plugin asset/readme update - uses: 10up/action-wordpress-plugin-asset-update@stable + uses: tinify/action-wordpress-plugin-asset-update@stable env: - SLUG: + SLUG: tiny-compress-images SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} SVN_USERNAME: ${{ secrets.SVN_USERNAME }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6cb405a3..232c6a22 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,5 @@ +# On release tag, will deploy new release to svn name: Release to Wordpress.org - on: release: types: [published] @@ -19,7 +19,7 @@ jobs: fetch-depth: 0 - name: WordPress Plugin Deploy id: deploy - uses: 10up/action-wordpress-plugin-deploy@stable + uses: tinify/action-wordpress-plugin-deploy@stable with: generate-zip: true env: