Skip to content

make compatible with latest 1.20.x version #14

make compatible with latest 1.20.x version

make compatible with latest 1.20.x version #14

Workflow file for this run

name: Build 1.20.x
on:
push:
tags:
- 'v*'
jobs:
main:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
- name: Get Version
id: version
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
result-encoding: string
script: |
let ref = '${{ github.ref }}';
return ref.startsWith('refs/tags/v') ? ref.replace('refs/tags/v', '') : 'indev';
- name: Get Version Type
id: version_type
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
result-encoding: string
script: |
let version = '${{ steps.version.outputs.result }}';
return version.includes('alpha') ? 'alpha' : (version.includes('beta') ? 'beta' : 'release');
- name: Log Version Info
env:
VERSION: ${{ steps.version.outputs.result }}
VERSION_TYPE: ${{ steps.version_type.outputs.result }}
run: echo "version = $VERSION, type = $VERSION_TYPE"
- name: Build
uses: gradle/gradle-build-action@v2
with:
arguments: build
env:
VERSION: ${{ steps.version.outputs.result }}
- name: Publish
id: publish
if: ${{ steps.version.outputs.result != 'alpha' && success() }}
uses: Kir-Antipov/[email protected]
with:
modrinth-id: 6VieRZiz
modrinth-token: ${{ secrets.MODRINTH_API_KEY }}
curseforge-id: 1113980
curseforge-token: ${{ secrets.CURSEFORGE_API_KEY }}
github-tag: ${{ github.ref }}
github-draft: true
github-prerelease: false
github-token: ${{ secrets.GITHUB_TOKEN }}
name: Beneath 1.20.1-${{ steps.version.outputs.result }}
version: ${{ steps.version.outputs.result }}
version-type: ${{ steps.version_type.outputs.result }}
java: 17
loaders: |
forge
neoforge
changelog-file: CHANGELOG.md