diff --git a/.github/workflows/build-plugin.yml b/.github/workflows/build-plugin.yml index 4a93f26..f287f2b 100644 --- a/.github/workflows/build-plugin.yml +++ b/.github/workflows/build-plugin.yml @@ -41,33 +41,12 @@ jobs: run: | mv plugin/build/distributions/*.zip plugin/build/distributions/yamp_plugin_${{ steps.get_version.outputs.version }}.zip - - name: Check release tag - id: tag_check - run: | - if git ls-remote --tags origin "refs/tags/v${{ steps.get_version.outputs.version }}" | grep -q .; then - echo "exists=true" >> "$GITHUB_OUTPUT" - else - echo "exists=false" >> "$GITHUB_OUTPUT" - fi - - - name: Create tag - if: steps.tag_check.outputs.exists == 'false' - run: | - git config --global user.name 'github-actions' - git config --global user.email 'github-actions@github.com' - git tag v${{ steps.get_version.outputs.version }} - git push origin v${{ steps.get_version.outputs.version }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Skip release when tag already exists - if: steps.tag_check.outputs.exists == 'true' - run: | - echo "::warning::Tag v${{ steps.get_version.outputs.version }} already exists; skipping plugin release. Bump yampVersion in gradle.properties to publish a new version." - - - name: Create GitHub Release - id: create_release - if: steps.tag_check.outputs.exists == 'false' + # Attaches the plugin zip to the release for this version. + # softprops/action-gh-release creates the release+tag when missing and + # appends the asset to the existing release when the tag was already + # published (e.g. by app-build.yml). Never skip: multiple merges share a + # date-based version, and the plugin must land on the release regardless. + - name: Upload plugin artifact to GitHub Release uses: softprops/action-gh-release@v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -77,11 +56,4 @@ jobs: draft: false prerelease: false generate_release_notes: true - - - name: Upload plugin artifact to release - if: steps.tag_check.outputs.exists == 'false' - uses: softprops/action-gh-release@v2 - with: files: plugin/build/distributions/yamp_plugin_${{ steps.get_version.outputs.version }}.zip - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}