From 3de9fd655bd26fd10953f961310863717ab16ebc Mon Sep 17 00:00:00 2001 From: Diego Silva Date: Mon, 2 Feb 2026 13:00:39 -0500 Subject: [PATCH] Refactor release workflow and packaging configuration - Remove `application-nomad.properties` as it's no longer used. - Update Maven `pom.xml` to set `finalName` for consistent artifact naming. - Enhance release pipeline to: - Set permissions for upload actions. - Refactor Maven build command to explicitly define `uber-jar` packaging. - Automatically upload the built artifact (`java-nomad-example-runner.jar`) as a release asset. --- .github/workflows/release.yml | 16 ++++++++++++++-- pom.xml | 1 + src/main/resources/application-nomad.properties | 1 - 3 files changed, 15 insertions(+), 3 deletions(-) delete mode 100644 src/main/resources/application-nomad.properties diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c902044..01c0a7f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,6 +8,8 @@ on: jobs: build-and-release: runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Checkout code uses: actions/checkout@v3 @@ -20,7 +22,7 @@ jobs: cache: maven - name: Build with Maven - run: mvn -B clean package -Dquarkus.profile=nomad + run: mvn -B clean package -Dquarkus.package.type=uber-jar - name: Create Release id: create_release @@ -33,4 +35,14 @@ jobs: body: | New release based on commit ${{ github.sha }} draft: false - prerelease: false \ No newline at end of file + prerelease: false + + - name: Upload Release Asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./target/java-nomad-example-runner.jar + asset_name: java-nomad-example-runner.jar + asset_content_type: application/java-archive \ No newline at end of file diff --git a/pom.xml b/pom.xml index 823c620..2b966e7 100644 --- a/pom.xml +++ b/pom.xml @@ -47,6 +47,7 @@ + java-nomad-example ${quarkus.platform.group-id} diff --git a/src/main/resources/application-nomad.properties b/src/main/resources/application-nomad.properties deleted file mode 100644 index cf894e2..0000000 --- a/src/main/resources/application-nomad.properties +++ /dev/null @@ -1 +0,0 @@ -quarkus.package.jar.type=uber-jar \ No newline at end of file