AnvilCraftMod v1.3.1 #7
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: Upload Release Asset | |
on: | |
release: | |
types: [ published ] | |
jobs: | |
build: | |
permissions: write-all | |
env: | |
CI_BUILD: false | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/[email protected] | |
- name: validate gradle wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Setup Java 17 | |
uses: actions/[email protected] | |
with: | |
distribution: zulu | |
java-version: 17 | |
- name: make gradle wrapper executable | |
if: ${{ runner.os != 'Windows' }} | |
run: chmod +x ./gradlew | |
- name: Build | |
uses: gradle/[email protected] | |
with: | |
arguments: build | |
- name: Get Version | |
id: version | |
run: | | |
MESSAGE=$(ls forge/build/libs/* | grep sources.jar -v | grep shadow.jar -v | grep slim.jar -v | awk -F 'anvilcraft-forge-|.jar' '{print $2}') | |
echo "version=$MESSAGE" >> $GITHUB_OUTPUT | |
- name: capture build artifacts | |
uses: actions/[email protected] | |
with: | |
name: AnvilCraftMod ${{ steps.version.outputs.version }} | |
path: | | |
fabric/build/libs/anvilcraft-fabric-${{ steps.version.outputs.version }}.jar | |
forge/build/libs/anvilcraft-forge-${{ steps.version.outputs.version }}.jar | |
- name: Publish to maven | |
run: ./gradlew publish | |
env: | |
MAVEN_URL: ${{ secrets.MAVEN_URL }} | |
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | |
- name: Upload Release Jar | |
uses: softprops/[email protected] | |
with: | |
files: | | |
fabric/build/libs/anvilcraft-fabric-${{ steps.version.outputs.version }}.jar | |
forge/build/libs/anvilcraft-forge-${{ steps.version.outputs.version }}.jar | |
- name: publish fabric mc mod | |
uses: Kir-Antipov/[email protected] | |
with: | |
name: AnvilCraftMod v${{ steps.version.outputs.version }} | |
version: ${{ steps.version.outputs.version }} | |
game-versions: 1.20.1 | |
version-type: release | |
java: 17 | |
loaders: | | |
fabric | |
quilt | |
dependencies: [email protected]+1.20.1(required){modrinth:P7dR8mSH}{curseforge:306612} | |
fail-mode: skip | |
changelog: ${{ github.event.release.body }} | |
modrinth-id: vuISAWPc | |
modrinth-token: ${{ secrets.MODRINTH_TOKEN }} | |
modrinth-featured: true | |
curseforge-id: 986251 | |
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} | |
files: fabric/build/libs/anvilcraft-fabric-${{ steps.version.outputs.version }}.jar | |
- name: publish forge mc mod | |
uses: Kir-Antipov/[email protected] | |
with: | |
name: AnvilCraftMod v${{ steps.version.outputs.version }} | |
version: ${{ steps.version.outputs.version }} | |
game-versions: 1.20.1 | |
version-type: release | |
java: 17 | |
loaders: forge | |
fail-mode: skip | |
changelog: ${{ github.event.release.body }} | |
modrinth-id: vuISAWPc | |
modrinth-token: ${{ secrets.MODRINTH_TOKEN }} | |
modrinth-featured: true | |
curseforge-id: 986251 | |
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} | |
files: forge/build/libs/anvilcraft-forge-${{ steps.version.outputs.version }}.jar |