Skip to content

Commit

Permalink
fix: Exit with 0 after successful build
Browse files Browse the repository at this point in the history
jamilraichouni committed Oct 23, 2024
1 parent 4b41816 commit b95a8e3
Showing 2 changed files with 5 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/build-addon.yml
Original file line number Diff line number Diff line change
@@ -109,7 +109,6 @@ jobs:
--java-execution-environment=JavaSE-17 \
$(find . -type f -name "Main.java") \
/tmp/capella_${{ matrix.capella.version }}
cat .classpath
- name: Build workspace
run: |-
cd ${{ matrix.addon }}
@@ -124,17 +123,15 @@ jobs:
cd ${{ matrix.addon }}
python ../capella_addons/__main__.py -v \
package \
/usr/lib/jvm/${{ matrix.capella.jdk.name }} \
/usr/lib/jvm/jdk-17.0.6+10 \
/tmp/jdtls
/usr/lib/jvm/jdk-17.0.6+10
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
tag_name: ${{ matrix.addon }}.${{ github.ref }}
release_name: ${{ matrix.addon }} ${{ github.ref }}
draft: false
prerelease: false
- name: Publish release
@@ -143,6 +140,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ matrix.addon }}/target/*.jar
asset_path: ${{ matrix.addon }}/target/com.deutschebahn.rest-api_0.0.1.jar
asset_name: com.deutschebahn.${{ matrix.addon }}_${{ github.ref }}.jar
asset_content_type: application/java-archive
1 change: 1 addition & 0 deletions capella_addons/__main__.py
Original file line number Diff line number Diff line change
@@ -608,6 +608,7 @@ def build_workspace(
status = response.get("result", BuildWorkspaceStatus.FAILED.value)
if status == BuildWorkspaceStatus.SUCCEED.value:
click.echo("Build of workspace succeeded.")
sys.exit(0)
elif status == BuildWorkspaceStatus.CANCELLED.value:
click.echo("Build of workspace cancelled.")
elif status == BuildWorkspaceStatus.WITH_ERROR.value:

0 comments on commit b95a8e3

Please sign in to comment.