skip artifact building #92
This file contains hidden or 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: Create Plugin.jar | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Fetch Project | |
| uses: actions/checkout@v4 | |
| - name: Setting Up Java 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'zulu' | |
| cache: maven | |
| - name: Build and Package Plugin | |
| run: | | |
| artifactPath="$(pwd)/target" | |
| artifactName="$(mvn help:evaluate -Dexpression=project.build.finalName -q -DforceStdout)" | |
| git_hash=$(git rev-parse --short "$GITHUB_SHA") | |
| echo "artifactPath=${artifactPath}" >> $GITHUB_ENV | |
| echo "artifactName=${artifactName}" >> $GITHUB_ENV | |
| echo git_hash=${git_hash} >> $GITHUB_ENV | |
| mvn clean install -DskipTests | |
| mv "${artifactPath}/${artifactName}.jar" "${artifactPath}/${artifactName}-${git_hash}.jar" |