v1.1.1 #16
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
| name: CI | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| release: | |
| types: [ "published" ] | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: 17 | |
| distribution: temurin | |
| cache: maven | |
| - name: Build With Maven | |
| run: mvn -B package --file pom.xml | |
| publish: | |
| name: Publish | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'release' | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: 17 | |
| distribution: temurin | |
| cache: maven | |
| - name: Set version from release tag | |
| run: mvn -B versions:set -DnewVersion=${{ github.event.release.tag_name }} -DgenerateBackupPoms=false | |
| - name: Build and package Maven project | |
| run: mvn -B clean package --file pom.xml | |
| - name: Upload to release | |
| uses: cloudnode-pro/[email protected] | |
| with: | |
| gh-token: ${{ github.token }} | |
| files: target/AnvilUnlocker-${{ github.event.release.tag_name }}.jar; type=application/java-archive | |
| - name: Upload to Modrinth | |
| uses: cloudnode-pro/modrinth-publish@v2 | |
| with: | |
| token: ${{ secrets.MODRINTH_TOKEN }} | |
| project: ${{ github.event.repository.custom_properties.modrinth_id }} | |
| name: ${{ github.event.release.name == github.event.release.tag_name && format('AnvilUnlocker {0}', github.event.release.name) || github.event.release.name }} | |
| version: ${{ github.event.release.tag_name }} | |
| changelog: ${{ github.event.release.body }} | |
| loaders: |- | |
| paper | |
| bukkit | |
| spigot | |
| game-versions: |- | |
| 1.15.x | |
| 1.16.x | |
| 1.17.x | |
| 1.18.x | |
| 1.19.x | |
| 1.20.x | |
| 1.21.x | |
| files: target/AnvilUnlocker-${{ github.event.release.tag_name }}.jar |