Skip to content

Merge pull request #1135 from ZhuRuoLing/feature/visual_effect #760

Merge pull request #1135 from ZhuRuoLing/feature/visual_effect

Merge pull request #1135 from ZhuRuoLing/feature/visual_effect #760

Workflow file for this run

name: CI for AnvilCraftMod
on:
push:
branches:
- releases/**
paths:
- common/**
- fabric/**
- forge/**
- build.gradle
- gradle.properties
- settings.gradle
jobs:
gametest:
secrets: inherit
uses: ./.github/workflows/gametest.yml
build:
runs-on: ubuntu-latest
env:
CI_BUILD: true
PR_BUILD: false
steps:
- name: checkout
uses: actions/checkout@v4
- name: validate gradle wrapper
uses: gradle/actions/wrapper-validation@v3
- 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 with Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build
run: ./gradlew build
- name: Read Properties
id: 'properties'
uses: christian-draeger/[email protected]
with:
path: gradle.properties
properties: 'mod_id mod_name'
- 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 '${{ steps.properties.outputs.mod_id }}-forge-|.jar' '{print $2}')
echo "version=$MESSAGE" >> $GITHUB_OUTPUT
- name: capture build artifacts
uses: actions/[email protected]
with:
name: "${{ steps.properties.outputs.mod_name }} ${{ 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 }}
continue-on-error: true