Skip to content

Commit

Permalink
ci: add step to add JAR as a release artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
lentidas committed Oct 17, 2024
1 parent 182c8ef commit 0446891
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,25 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: maven

upload-release-artifact:
needs: release-please
runs-on: ubuntu-latest
if: ${{ needs.release-please.outputs.releases_created }}
steps:
- name: "Check out the repository"
uses: actions/checkout@v4

- name: "Setup Java and Maven"
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

- name: "Package JAR using Maven wrapper"
run: ./mvnw dependency:go-offline clean compile package

- name: "Upload Release Artifact"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ steps.release-please.outputs.tag_name }} ./target/shadow-${{ steps.release-please.outputs.major }}.${{ steps.release-please.outputs.minor }}.${{ steps.release-please.outputs.patch }}.jar

0 comments on commit 0446891

Please sign in to comment.