Skip to content

feat: update acid fluid with wip texture #65

feat: update acid fluid with wip texture

feat: update acid fluid with wip texture #65

# This workflow will build the Mod with Gradle and cache/restore any dependencies to improve the workflow execution time
# Note: cache writing only happens on the default branch but child branches do have read access to the default branch
name: Build Dev Snapshot
on:
workflow_dispatch:
push:
branches:
- '**/dev'
permissions:
contents: write
jobs:
check_if_should_build:
name: Check if a build should be triggered
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.changelog.outputs.skipped }}
steps:
- name: Checkout Repository
uses: actions/checkout@v5.0.0
- name: Get Minecraft Version
id: gradle_properties
uses: christian-draeger/read-properties@1.1.0
with:
path: './gradle.properties'
properties: 'minecraft_version'
- name: Generate Conventional Changelog
id: changelog
uses: Elenterius/conventional-changelog-action@e291986df89d31b4088e31d407e34e8787da70c9
# forked gh-action: uses custom pre-release bump strategy
with:
preset: 'conventionalcommits'
github-token: ${{ secrets.GITHUB_TOKEN }}
version-file: './gradle.properties'
version-path: 'mod_semantic_version'
tag-prefix: '${{ steps.gradle_properties.outputs.minecraft_version }}-v2.'
release-count: 1 # limit changelog to the current snapshot
skip-commit: true # do not commit version bump
skip-tag: true # do not commit version tag
pre-release: true
pre-release-identifier: 'alpha'
setup_oxipng:
name: Install Oxipng
needs: [ check_if_should_build ]
if: needs.check_if_should_build.outputs.skip == 'false'
runs-on: ubuntu-latest
steps:
- name: Cargo Install Oxipng
uses: baptiste0928/cargo-install@v3.3.1 #provides cache-efficient Rust crates installation
with:
crate: oxipng
env:
CARGO_TERM_COLOR: always
build_test:
name: Gradle Build Test
needs: [ check_if_should_build ]
if: needs.check_if_should_build.outputs.skip == 'false'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5.0.0
- uses: actions/setup-java@v5.0.0
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle, Validate Wrapper and Enable Caching
uses: gradle/actions/setup-gradle@v4.4.2
with:
cache-read-only: false
- name: Test Asset Generation
run: ./gradlew runData
- name: Test Build
run: ./gradlew build
build_snapshot:
name: Build Snapshot
needs: [ build_test, setup_oxipng ]
runs-on: ubuntu-latest
steps:
- name: Install Oxipng
uses: baptiste0928/cargo-install@v3.3.2
with:
crate: oxipng
env:
CARGO_TERM_COLOR: always
- name: Checkout Repository
uses: actions/checkout@v5.0.0
- name: Get Short SHA
run: echo "SNAPSHOT_SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV
- name: Get Minecraft Version
id: gradle_properties
uses: christian-draeger/read-properties@1.1.0
with:
path: './gradle.properties'
properties: 'minecraft_version'
- name: Generate Conventional Changelog
id: changelog
uses: Elenterius/conventional-changelog-action@e291986df89d31b4088e31d407e34e8787da70c9
# forked gh-action: uses custom pre-release bump strategy
with:
preset: 'conventionalcommits'
github-token: ${{ secrets.GITHUB_TOKEN }}
version-file: './gradle.properties'
version-path: 'mod_semantic_version'
git-message: 'chore(pre-release): {version}'
tag-prefix: '${{ steps.gradle_properties.outputs.minecraft_version }}-v2.'
release-count: 2 # limit changelog to the current and previous snapshot
pre-release: true
pre-release-identifier: 'alpha'
- name: Setup JDK 17
uses: actions/setup-java@v5.0.0
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4.4.2
with:
cache-read-only: false
- name: Generate Assets
run: ./gradlew runData
- name: Optimize PNG Assets
run: |
oxipng -o 3 -i 0 --strip safe -r ./src/*/resources/*.png
oxipng -o 3 -i 0 --strip safe -r ./src/*/resources/assets/*/textures
env:
CARGO_TERM_COLOR: always
- name: Build Artifact
run: ./gradlew build
- name: Remove slim jars
run: rm -f build/libs/*-slim.jar
- name: Upload Artifact
id: artifact-upload
uses: actions/upload-artifact@v4.6.2
with:
name: dev-build
if-no-files-found: error
retention-days: 30
path: build/libs/*.jar
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2.3.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}
files: build/libs/*.jar
prerelease: true
- name: Notify Discord Server
uses: sarisia/actions-status-discord@v1.15.3
with:
webhook: ${{ secrets.DISCORD_WEBHOOK_URL }}
nodetail: true
color: 0x088c7d
username: "Maykr Bot"
content: "<@&1098316788116246550>"
title: ":package: New Biomancy Snapshot Available!"
description: |
## Version: `${{ steps.changelog.outputs.tag }}`
## [View changelog and download on GitHub](${{ steps.create_release.outputs.url }})
Don't forget to give us feedback :pray: