diff --git a/.github/workflows/release-soft.yml b/.github/workflows/release-soft.yml new file mode 100644 index 0000000..2ddf3fe --- /dev/null +++ b/.github/workflows/release-soft.yml @@ -0,0 +1,19 @@ +# on commit to master 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: tinify/action-wordpress-plugin-asset-update@stable + env: + 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 new file mode 100644 index 0000000..232c6a2 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +# On release tag, will deploy new release to svn +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: WordPress Plugin Deploy + id: deploy + uses: tinify/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