The rest of the mod #1
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: Gradle Tests and Nightly (CI) | |
env: | |
GH_PKG_URL: "https://maven.pkg.github.com/${{ github.repository }}" | |
on: | |
workflow_dispatch: | |
push: | |
paths-ignore: | |
- "README.md" | |
- "LICENSE" | |
- ".github/**/*" | |
jobs: | |
vars: | |
name: Get Variables | |
runs-on: ubuntu-22.04 | |
outputs: | |
version: ${{steps.version.outputs.version}} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 150 | |
fetch-tags: true | |
submodules: true | |
- name: Version | |
id: version | |
uses: paulhatch/[email protected] | |
with: | |
change_path: "neoforge" | |
version_format: "${major}.${minor}.${patch}.${increment}-nightly" | |
search_commit_body: true | |
datagen: | |
name: Data Generators | |
runs-on: ubuntu-22.04 | |
needs: [ vars ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Data Generation | |
run: ./gradlew :neoforge:runData | |
env: | |
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Store Built Assets | |
if: success() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: generated-data | |
path: neoforge/src/generated/resources | |
publish-gh-package: | |
name: Publish Github Package - Nightly | |
runs-on: ubuntu-22.04 | |
needs: [ vars, datagen ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Pull Built Generated Data | |
uses: actions/download-artifact@v4 | |
with: | |
name: generated-data | |
path: neoforge/src/generated/resources | |
- name: Publish | |
run: ./gradlew :neoforge:publish | |
env: | |
VERSION: ${{ needs.vars.outputs.version }} | |
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
announce: | |
name: Discord Announcement | |
needs: [ publish-gh-package ] | |
uses: ./.github/workflows/announce-latest-nightly.yml | |
secrets: inherit |