unlock registrate version range #17
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: Build and Publish | |
on: | |
push: | |
tags: | |
- 'v**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up OpenJDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: temurin | |
- name: Get version from tag | |
id: tag_name | |
run: | | |
echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v} | |
shell: bash | |
- name: Read property from gradle.properties | |
id: read_property | |
run: echo "MC_VERSION=$(grep -Po 'mc_version=\K.*' gradle.properties)" >> $GITHUB_ENV | |
- name: Build | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: build | |
cache-read-only: false | |
gradle-home-cache-cleanup: true | |
- name: Get Changelog Entry | |
id: changelog_reader | |
uses: mindsers/changelog-reader-action@v2 | |
with: | |
validation_level: warn | |
version: ${{ steps.tag_name.outputs.current_version }} | |
path: ./CHANGELOG.md | |
- name: Create Release | |
id: create_release | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
draft: false | |
name: Tome of Blood ${{ env.MC_VERSION }}-${{ steps.tag_name.outputs.current_version }} | |
body: ${{ steps.changelog_reader.outputs.changes }} | |
tag: ${{ github.ref }} | |
artifacts: ./build/libs/tomeofblood-${{ env.MC_VERSION }}-${{ steps.tag_name.outputs.current_version }}-all.jar | |
artifactContentType: application/java-archive | |
- name: Upload to Mod Platforms | |
uses: Kir-Antipov/[email protected] | |
with: | |
modrinth-id: W5NORTN9 | |
modrinth-token: ${{ secrets.MODRINTH_API_KEY }} | |
curseforge-id: 911546 | |
curseforge-token: ${{ secrets.CURSEFORGE_API_KEY }} | |
files: | | |
build/libs/tomeofblood-${{ env.MC_VERSION }}-${{ steps.tag_name.outputs.current_version }}-all.jar | |
name: Tome of Blood ${{ env.MC_VERSION }}-${{ steps.tag_name.outputs.current_version }} | |
version: ${{ env.MC_VERSION }}-${{ steps.tag_name.outputs.current_version }} | |
game-versions: | | |
${{ env.MC_VERSION }} | |
changelog: |- | |
${{ steps.changelog_reader.outputs.changes }} | |
dependencies: | | |
forge(required) | |
ars-nouveau(required) | |
blood-magic(required) |