diff --git a/.github/workflows/publish-on-release.yml b/.github/workflows/publish-on-release.yml index 9022c2b..6c498f0 100644 --- a/.github/workflows/publish-on-release.yml +++ b/.github/workflows/publish-on-release.yml @@ -2,7 +2,7 @@ name: Publish plugin on release on: release: - types: [created] + types: [published] jobs: release: @@ -16,8 +16,6 @@ jobs: with: distribution: 'temurin' java-version: '17' - - name: Get the version - run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - name: Run tests uses: gradle/gradle-build-action@v3 with: @@ -42,7 +40,7 @@ jobs: ORG_GRADLE_PROJECT_withSigning: true with: arguments: | - -Pversion=${{ env.RELEASE_VERSION }} + -Pversion=${{ github.event.release.tag_name }} -Pgradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }} -Pgradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }} --stacktrace