v1.0.3 #4
Workflow file for this run
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: Maven Release | |
on: | |
release: | |
types: [ published ] | |
jobs: | |
package-and-upload: | |
name: Build and Upload JARs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Java | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Set release version | |
run: | | |
TAG=${{ github.event.release.tag_name }} | |
echo "VERSION=${TAG#v}" >> $GITHUB_OUTPUT | |
id: version | |
- name: Set project version | |
run: mvn -B versions:set -DnewVersion=${{ steps.version.outputs.VERSION }} -DgenerateBackupPoms=false | |
- name: Build and package Maven project | |
run: mvn clean package | |
- name: Upload to release | |
uses: JasonEtco/upload-to-release@master | |
with: | |
args: target/EnchantBookPlus-${{ steps.version.outputs.VERSION }}.jar application/java-archive | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload to Modrinth | |
uses: cloudnode-pro/[email protected] | |
with: | |
token: '${{ secrets.MODRINTH_TOKEN }}' | |
project: '${{ github.event.repository.custom_properties.modrinth_id }}' | |
file: target/EnchantBookPlus-${{ steps.version.outputs.VERSION }}.jar | |
changelog: ${{ github.event.release.body }} | |
loaders: paper |