faet: update workflow #18
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: Build with Maven | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| inputs: | |
| logLevel: | |
| description: 'Start Build' | |
| required: true | |
| default: 'warning' | |
| tags: | |
| required: false | |
| description: 'Start Build' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: 17 | |
| - name: Build with Maven (BungeeCord) | |
| run: cd bungeecord && mvn clean package -T4 | |
| - name: Build with Maven (Velocity) | |
| run: cd velocity && mvn clean package -T4 | |
| - name: Get the current commit SHA | |
| id: vars | |
| run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
| - name: Create and push tag | |
| run: | | |
| git config user.name "${{ github.actor }}" | |
| git config user.email "${{ github.actor }}@users.noreply.github.com" | |
| git tag release-${{ steps.vars.outputs.sha_short }} | |
| git push origin release-${{ steps.vars.outputs.sha_short }} | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: release-${{ steps.vars.outputs.sha_short }} | |
| name: Release ${{ steps.vars.outputs.sha_short }} | |
| draft: false | |
| prerelease: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload BungeeCord JAR | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: release-${{ steps.vars.outputs.sha_short }} | |
| files: bungeecord/target/*.jar | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload Velocity JAR | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: release-${{ steps.vars.outputs.sha_short }} | |
| files: velocity/target/*.jar | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |