Publish to WordPress.org #18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish to WordPress.org | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| PLUGIN_VERSION: | |
| description: 'Version to publish (MAJOR.MINOR.PATCH)' | |
| required: true | |
| GIT_REF: | |
| description: 'Git tag or branch to publish' | |
| required: true | |
| DRY_RUN: | |
| description: 'Do not commit to SVN' | |
| type: boolean | |
| default: true | |
| UPDATE_TRUNK_ONLY: | |
| description: 'Only update trunk, skip tag creation' | |
| type: boolean | |
| default: true | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Reject dev/* branches | |
| run: | | |
| if [[ "${{ inputs.GIT_REF }}" == dev/* ]]; then | |
| echo "::error::GIT_REF '${{ inputs.GIT_REF }}' looks like a source branch, not a build branch. Build artifacts live on the branch with the 'dev/' prefix stripped (e.g. 'main'). Aborting." | |
| exit 1 | |
| fi | |
| publish: | |
| needs: validate | |
| uses: inpsyde/reusable-workflows/.github/workflows/wordpress-org-release.yml@fix/wporg-combined-commit | |
| with: | |
| DRY_RUN: ${{ inputs.DRY_RUN }} | |
| SVN_PLUGIN_SLUG: zettle-pos-integration | |
| PLUGIN_VERSION: ${{ inputs.PLUGIN_VERSION }} | |
| GIT_REF: ${{ inputs.GIT_REF }} | |
| UPDATE_TRUNK_ONLY: ${{ inputs.UPDATE_TRUNK_ONLY }} | |
| secrets: | |
| SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | |
| SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | |
| GITHUB_USER_SSH_KEY: ${{ secrets.GITHUB_USER_SSH_KEY }} |