Bump version to v2.2.0 for release #1
Workflow file for this run
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
| # This workflow will build a package using Maven and then publish it to GitHub packages when a release is created | |
| # For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path | |
| name: Maven Package HauntedMC Plugin | |
| on: | |
| push: | |
| tags: | |
| - v* | |
| jobs: | |
| deploy: | |
| name: Deploy Distributables | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| #cache: 'maven' | |
| server-id: github # Value of the distributionManagement/repository/id field of the pom.xml | |
| settings-path: ${{ github.workspace }} # location for the settings.xml file | |
| - name: Build with Maven | |
| run: mvn -B package --file pom.xml | |
| - name: Get Target Name | |
| run: bash ./scripts/get_target_name.sh | |
| - name: Upload Distributable Jar | |
| id: upload-final | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist | |
| path: ./target/${{ env.TARGET_NAME }}.jar | |
| - name: Publish to GitHub Packages Apache Maven | |
| run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Download Artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist | |
| - name: Set Release Variables | |
| run: bash ./scripts/set_release_ver.sh | |
| - name: Create Release | |
| id: create-release | |
| uses: softprops/action-gh-release@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| name: ${{ env.VERSIONED_NAME }} | |
| body: ${{ env.GENERATED_CHANGELOG }} | |
| draft: false | |
| prerelease: false | |
| files: ./dist/${{ env.TARGET_NAME }}.jar |