ci: rename release-please configuration file to proper name (#25) #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: "release-please" | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release-please: | |
permissions: | |
contents: write | |
pull-requests: write | |
runs-on: ubuntu-latest | |
outputs: | |
releases_created: ${{ steps.release-please.outputs.releases_created }} | |
steps: | |
- uses: googleapis/release-please-action@v4 | |
id: release-please | |
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 |