Skip to content

Commit

Permalink
Update build action
Browse files Browse the repository at this point in the history
  • Loading branch information
RealCLanger committed Jan 19, 2024
1 parent 9c789f8 commit 8d0090b
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 &
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand Down

0 comments on commit 8d0090b

Please sign in to comment.