Skip to content

Commit

Permalink
ci: add conditions to all steps on upload-release-artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
lentidas committed Oct 17, 2024
1 parent 22f5b21 commit 36bf534
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,24 @@ jobs:
upload-release-artifact:
needs: release-please
runs-on: ubuntu-latest
if: ${{ needs.release-please.outputs.releases_created }}
steps:
- name: "Check out the repository"
if: ${{ needs.release-please.outputs.releases_created }}
uses: actions/checkout@v4

- name: "Setup Java and Maven"
if: ${{ needs.release-please.outputs.releases_created }}
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

- name: "Package JAR using Maven wrapper"
if: ${{ needs.release-please.outputs.releases_created }}
run: ./mvnw dependency:go-offline clean compile package

- name: "Upload Release Artifact"
if: ${{ needs.release-please.outputs.releases_created }}
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 36bf534

Please sign in to comment.