Skip to content

0.6.1+1.21.3

0.6.1+1.21.3 #6

Workflow file for this run

name: Build
on:
release:
types:
- published
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v2
with:
path: |
~/.gradle/loom-cache
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 21
- name: Read mod version from Gradle
id: read_version
uses: christian-draeger/[email protected]
with:
path: './gradle.properties'
property: 'mod_version'
- name: Generate build number
uses: kNoAPP/gh-action-buildnum@7952ffa54bc2c37e2c33bbb3d7226473274cce3e
id: 'minor_version'
with:
workflow_name: 'minor_version'
version_key: ${{ steps.read_version.outputs.value }}
gist_token: ${{ secrets.GIST_TOKEN }}
skip_bump: true
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build and publish with Gradle
run: ./gradlew build publish
env:
MAVEN_URL: ${{ secrets.MAVEN_URL }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
GITHUB_ACTIONS: true
SNAPSHOT: false
MINOR_VERSION: ${{ steps.minor_version.outputs.version_build_number }}
MODRINTH: ${{ secrets.MODRINTH_KEY }}
CHANGELOG: ${{ github.event.release.body }}
- name: Bump build number
uses: kNoAPP/gh-action-buildnum@7952ffa54bc2c37e2c33bbb3d7226473274cce3e
id: 'justbump'
with:
workflow_name: 'minor_version'
version_key: ${{ steps.read_version.outputs.value }}
gist_token: ${{ secrets.GIST_TOKEN }}
- uses: actions/upload-artifact@v4
with:
name: artifacts
path: build/libs