Skip to content

v1.0.4

v1.0.4 #1

Workflow file for this run

name: Maven Release
on:
release:
types: [published]
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
cache: maven
- name: Get release version from tag
run: |
TAG=${{ github.event.release.tag_name }}
echo "VERSION=${TAG#v}" >> $GITHUB_OUTPUT
id: version
- name: Set project release version
run: mvn -B versions:set -DnewVersion=${{ steps.version.outputs.VERSION }} -DgenerateBackupPoms=false
- name: Build and package Maven project
run: mvn -B clean package --file pom.xml
- name: Upload to release
uses: cloudnode-pro/release-upload-asset@1.0.2
with:
gh-token: ${{ github.token }}
files: target/EnchantBookPlus-${{ steps.version.outputs.VERSION }}.jar; type=application/java-archive
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload to Modrinth
uses: cloudnode-pro/modrinth-publish@2.0.0
with:
token: '${{ secrets.MODRINTH_TOKEN }}'
project: '${{ github.event.repository.custom_properties.modrinth_id }}'
name: ${{ github.event.release.name == github.event.release.tag_name && format('EnchantBookPlus {0}', steps.version.outputs.VERSION) || github.event.release.name }}
version: ${{ steps.version.outputs.VERSION }}
changelog: ${{ github.event.release.body }}
loaders: paper
game-versions: |-
1.20.x
1.21.x
files: target/EnchantBookPlus-${{ steps.version.outputs.VERSION }}.jar
dependencies: '[{"project_id":"N4CZEMrg","dependency_type":"optional"}]'