From a32db6d39eb6f7df6b9585a3af75a1f7ec9ed049 Mon Sep 17 00:00:00 2001 From: Christoph Langer Date: Fri, 19 Jan 2024 21:57:08 +0100 Subject: [PATCH] Update build action --- .github/workflows/build.yml | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a071aa94be..aa6aad120a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -84,9 +84,10 @@ jobs: echo "agentVersion=$(echo $AGENT_VERSION)" >> $GITHUB_OUTPUT - name: Download existing release file - uses: robinraju/release-downloader@v1.4 + uses: robinraju/release-downloader@v1 continue-on-error: true with: + repository: RealClanger/jmc tag: ${{ steps.versions.outputs.githubRelease }} fileName: buildRef-${{ steps.versions.outputs.jmcVersion }}.txt @@ -168,18 +169,20 @@ jobs: echo '${{ needs.parameters.outputs.commit }}' > buildRef.txt - name: Build & test core libraries + if: needs.parameters.outputs.publish == 'truex' run: | $MAVEN_CALL install working-directory: core - name: Build & test agent # we build the agent only in snapshots - if: needs.parameters.outputs.release != 'true' + if: needs.parameters.outputs.publish == 'truex' run: | $MAVEN_CALL install working-directory: agent - name: Build JMC + if: needs.parameters.outputs.publish == 'truex' run: | $MAVEN_CALL p2:site $MAVEN_CALL jetty:run & @@ -203,25 +206,23 @@ jobs: - name: Delete old GitHub release ${{ needs.parameters.outputs.githubRelease }} if: ${{ needs.parameters.outputs.publish == 'true' && needs.parameters.outputs.release != 'true' }} continue-on-error: true - uses: dev-drprasad/delete-tag-and-release@v0.2.1 + uses: dev-drprasad/delete-tag-and-release@v1.0 with: delete_release: true tag_name: ${{ needs.parameters.outputs.githubRelease }} - env: - GITHUB_TOKEN: ${{ github.token }} + github_token: ${{ secrets.GITHUB_TOKEN }} - name: Create/Update GitHub release ${{ needs.parameters.outputs.githubRelease }} - if: needs.parameters.outputs.publish == 'true' - uses: ncipollo/release-action@v1.12.0 + if: needs.parameters.outputs.publish == 'truex' + uses: ncipollo/release-action@v1 with: tag: ${{ needs.parameters.outputs.githubRelease }} commit: ${{ needs.parameters.outputs.commit }} allowUpdates: ${{ needs.parameters.outputs.release != 'true' }} prerelease: ${{ needs.parameters.outputs.release != 'true' }} - draft: false - name: Upload buildRef-${{ needs.parameters.outputs.jmcVersion }}.txt - if: needs.parameters.outputs.publish == 'true' + if: needs.parameters.outputs.publish == 'truex' uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} @@ -231,7 +232,7 @@ jobs: overwrite: ${{ needs.parameters.outputs.release != 'true' }} - name: Upload sap.jmc-${{ needs.parameters.outputs.jmcVersion }}-linux.gtk.x86_64.tar.gz - if: needs.parameters.outputs.publish == 'true' + if: needs.parameters.outputs.publish == 'truex' uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} @@ -241,7 +242,7 @@ jobs: overwrite: ${{ needs.parameters.outputs.release != 'true' }} - name: Upload sap.jmc-${{ needs.parameters.outputs.jmcVersion }}-macosx.cocoa.aarch64.tar.gz - if: needs.parameters.outputs.publish == 'true' + if: needs.parameters.outputs.publish == 'truex' uses: svenstaro/upload-release-action@v2 with: tag: ${{ needs.parameters.outputs.githubRelease }} @@ -250,7 +251,7 @@ jobs: overwrite: ${{ needs.parameters.outputs.release != 'true' }} - name: Upload sap.jmc-${{ needs.parameters.outputs.jmcVersion }}-macosx.cocoa.x86_64.tar.gz - if: needs.parameters.outputs.publish == 'true' + if: needs.parameters.outputs.publish == 'truex' uses: svenstaro/upload-release-action@v2 with: tag: ${{ needs.parameters.outputs.githubRelease }} @@ -259,7 +260,7 @@ jobs: overwrite: ${{ needs.parameters.outputs.release != 'true' }} - name: Upload sap.jmc-${{ needs.parameters.outputs.jmcVersion }}-win32.win32.x86_64.zip - if: needs.parameters.outputs.publish == 'true' + if: needs.parameters.outputs.publish == 'truex' uses: svenstaro/upload-release-action@v2 with: tag: ${{ needs.parameters.outputs.githubRelease }} @@ -268,7 +269,7 @@ jobs: overwrite: ${{ needs.parameters.outputs.release != 'true' }} - name: Upload sap.jmc.updatesite.ide-${{ needs.parameters.outputs.jmcVersion }}.zip - if: needs.parameters.outputs.publish == 'true' + if: needs.parameters.outputs.publish == 'truex' uses: svenstaro/upload-release-action@v2 with: tag: ${{ needs.parameters.outputs.githubRelease }} @@ -278,7 +279,7 @@ jobs: - name: Upload agent-${{ needs.parameters.outputs.agentVersion }}.jar # we only build the agent in snapshots - if: ${{ needs.parameters.outputs.publish == 'true' && needs.parameters.outputs.release != 'true' }} + if: ${{ needs.parameters.outputs.publish == 'truex' && needs.parameters.outputs.release != 'true' }} uses: svenstaro/upload-release-action@v2 with: tag: ${{ needs.parameters.outputs.githubRelease }}