From fbddfd6f8ec7d2d1076b3df082c101d8e1f070f1 Mon Sep 17 00:00:00 2001 From: Fabrizio Scarponi <36624359+fscarponi@users.noreply.github.com> Date: Thu, 23 May 2024 20:16:16 +0200 Subject: [PATCH] 232 - Fix publication workflow (#182) * Fix publication workflow --- .github/workflows/publish-release.yml | 33 +++++++++++++++------------ 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 546705c2..789ad8de 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -3,11 +3,23 @@ name: Publish to Marketplace on: release: types: [ published ] + branches: [ releases/232 ] jobs: publish: name: Publish Package Search to Marketplace runs-on: ubuntu-latest + env: + TOOLBOX_ENTERPRISE_TOKEN: ${{ secrets.TOOLBOX_ENTERPRISE_TOKEN }} + MARKETPLACE_TOKEN: ${{ secrets.MARKETPLACE_TOKEN }} + GRADLE_ENTERPRISE_KEY: ${{ secrets.GRADLE_ENTERPRISE_KEY }} + SPACE_INTELLIJ_NIGHTLIES_TOKEN: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_TOKEN }} + SPACE_INTELLIJ_NIGHTLIES_USERNAME: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_USERNAME }} + SPACE_PACKAGE_SEARCH_TOKEN: ${{ secrets.SPACE_PACKAGE_SEARCH_TOKEN }} + SPACE_PACKAGE_SEARCH_USERNAME: ${{ secrets.SPACE_PACKAGE_SEARCH_USERNAME }} + RUN_NUMBER: ${{ github.run_number }} + RUN_ATTEMPT: ${{ github.run_attempt }} + CHANGE_NOTES: ${{ github.event.release.body }} steps: - uses: actions/checkout@v4 with: @@ -17,19 +29,12 @@ jobs: with: java-version: '17' distribution: 'zulu' - - uses: gradle/gradle-build-action@v2 - - name: Run :publishShadowPluginToMarketplace task - run: ./gradlew publishAllPublicationsToSpaceRepository :plugin:publishPluginToMarketplace - env: - MARKETPLACE_TOKEN: ${{ secrets.MARKETPLACE_TOKEN }} - GRADLE_ENTERPRISE_KEY: ${{ secrets.GRADLE_ENTERPRISE_KEY }} - MAVEN_SPACE_PASSWORD: ${{ secrets.MAVEN_SPACE_PASSWORD }} - MAVEN_SPACE_USERNAME: ${{ secrets.MAVEN_SPACE_USERNAME }} - CHANGE_NOTES: ${{ github.event.release.body }} - - name: Run :publishStablePluginToTBE task - run: ./gradlew :plugin:publishReleasePluginToTBE + - uses: gradle/gradle-build-action@v3 + - name: Publish libraries + run: ./gradlew publishAllPublicationsToSpaceRepository + - name: Publish release plugin to TBE env: KMP: true - TOOLBOX_ENTERPRISE_TOKEN: ${{ secrets.TOOLBOX_ENTERPRISE_TOKEN }} - GRADLE_ENTERPRISE_KEY: ${{ secrets.GRADLE_ENTERPRISE_KEY }} - CHANGE_NOTES: ${{ github.event.release.body }} + run: ./gradlew :plugin:publishReleasePluginToTBE + - name: Publish plugin to Marketplace + run: ./gradlew :plugin:publishPluginToMarketplace