Skip to content

Nightly Build

Nightly Build #479

Workflow file for this run

permissions:
contents: write
name: Nightly Build
on:
workflow_dispatch:
schedule:
- cron: "30 21 * * *"
jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: refs/heads/neoforge-dev/1.21.1
submodules: recursive
fetch-depth: 0
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 21
cache: "gradle"
- name: Prepare Permissions and Assets
run: |
find . -name "gradlew" -exec chmod +x {} +
git submodule foreach './gradlew runData'
cd ./ConfluenceOtherworld && ./gradlew runData
- name: Build Confluence
working-directory: ./ConfluenceOtherworld
run: |
chmod +x gradlew
./gradlew build
- name: Get version with date suffix
id: version
working-directory: ./ConfluenceOtherworld
run: |
if [ -f "gradle.properties" ]; then
BASE_VERSION=$(grep -E "^(mod_)?version\s*=" gradle.properties | head -1 | cut -d'=' -f2 | tr -d ' \r\n' | sed 's/-.*//')
else
BASE_VERSION="1.2.0"
fi
DATE_SUFFIX=$(date +%y%m%d)
FULL_VERSION="${BASE_VERSION}-alpha-${DATE_SUFFIX}"
echo "FULL_VERSION=$FULL_VERSION" >> $GITHUB_OUTPUT
- name: Cleanup Old Nightly Release
uses: dev-drprasad/delete-tag-and-release@v1.1
with:
delete_release: true
tag_name: nightly
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload to Nightly Release
uses: softprops/action-gh-release@v1
with:
files: ./ConfluenceOtherworld/build/libs/*.jar
tag_name: nightly
name: "Nightly Build - ${{ steps.version.outputs.FULL_VERSION }}"
prerelease: true
make_latest: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}