diff --git a/.github/workflows/release-soft.yml b/.github/workflows/release-soft.yml new file mode 100644 index 0000000..17553c2 --- /dev/null +++ b/.github/workflows/release-soft.yml @@ -0,0 +1,19 @@ +# action that will update the assets/readme +name: Plugin asset/readme update +on: + push: + branches: + - master +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 0000000..389bcb4 --- /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