Skip to content

18.1.1-alpha for Minecraft 1.20.6 #424

18.1.1-alpha for Minecraft 1.20.6

18.1.1-alpha for Minecraft 1.20.6 #424

Workflow file for this run

name: 'Release'
on:
release:
types: [ published ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
outputs:
ARTIFACT_PATH: ${{ steps.prepare_artifact_metadata.outputs.ARTIFACT_PATH }}
ARTIFACT_NAME: ${{ steps.prepare_artifact_metadata.outputs.ARTIFACT_NAME }}
JAVADOC_PATH: ${{ steps.prepare_artifact_metadata.outputs.JAVADOC_PATH }}
JAVADOC_NAME: ${{ steps.prepare_artifact_metadata.outputs.JAVADOC_NAME }}
API_PATH: ${{ steps.prepare_artifact_metadata.outputs.API_PATH }}
API_NAME: ${{ steps.prepare_artifact_metadata.outputs.API_NAME }}
VERSION: ${{ steps.prepare_artifact_metadata.outputs.VERSION }}
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/gradle-setup
- name: Build with Gradle
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew build -x check --no-daemon --max-workers 1
- name: Prepare artifact metadata. Note that VERSION is set by the gradle script.
id: prepare_artifact_metadata
run: |
echo ARTIFACT_PATH=./build/libs/appliedenergistics2-neoforge-${VERSION}.jar >> $GITHUB_OUTPUT
echo ARTIFACT_NAME=appliedenergistics2-neoforge-${VERSION}.jar >> $GITHUB_OUTPUT
echo JAVADOC_PATH=./build/libs/appliedenergistics2-neoforge-${VERSION}-javadoc.jar >> $GITHUB_OUTPUT
echo JAVADOC_NAME=appliedenergistics2-neoforge-${VERSION}-javadoc.jar >> $GITHUB_OUTPUT
echo API_PATH=./build/libs/appliedenergistics2-neoforge-${VERSION}-api.jar >> $GITHUB_OUTPUT
echo API_NAME=appliedenergistics2-neoforge-${VERSION}-api.jar >> $GITHUB_OUTPUT
echo VERSION=${VERSION} >> $GITHUB_OUTPUT
- name: Archive build results
# It is important to archive .gradle as well since gradle stores the incremental build state there
run: tar -I zstd -cf build.tar.zst .gradle build src/generated
- name: Upload build and gradle folders
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: build.tar.zst
if-no-files-found: error
retention-days: 3
upload-release-artifacts:
name: Upload Release Artifacts
needs: build
runs-on: ubuntu-latest
steps:
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: build-artifacts
- name: Unpack build artifact
run: tar axf build.tar.zst
- name: Upload Release Artifact
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ needs.build.outputs.ARTIFACT_PATH }}
asset_name: ${{ needs.build.outputs.ARTIFACT_NAME }}
asset_content_type: application/zip
- name: Upload Javadocs Artifact
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ needs.build.outputs.JAVADOC_PATH }}
asset_name: ${{ needs.build.outputs.JAVADOC_NAME }}
asset_content_type: application/zip
- name: Upload API
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ needs.build.outputs.API_PATH }}
asset_name: ${{ needs.build.outputs.API_NAME }}
asset_content_type: application/zip
deploy-github-packages:
name: Deploy to Github Packages
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/gradle-setup
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: build-artifacts
- name: Unpack build artifact
run: tar axf build.tar.zst
- name: Validate artifacts exist
run: test -d ./build && test -d ./.gradle
- name: Publish to Github Packages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew publishMavenPublicationToGitHubPackagesRepository --no-daemon --max-workers 1
deploy-curseforge:
name: Deploy to Curseforge
needs: build
runs-on: ubuntu-latest
steps:
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: build-artifacts
- name: Unpack build artifact
run: tar axf build.tar.zst
- name: Validate artifacts exist
run: test -d ./build
- name: Upload to Curseforge
uses: Kir-Antipov/mc-publish@995edadc13559a8b28d0b7e6571229f067ec7659
with:
name: AE2 ${{ needs.build.outputs.VERSION }} [NEOFORGE]
version: ${{ needs.build.outputs.VERSION }}
files: ${{ needs.build.outputs.ARTIFACT_PATH }}
dependencies: |
jade(optional){modrinth:nvQzSEkH}{curseforge:324717}
wthit(optional){modrinth:6AQIaxuO}{curseforge:440979}
rei(optional){modrinth:nfn13YXA}{curseforge:310111}
jei(optional){modrinth:u6dRKJwZ}{curseforge:238222}
optifine(incompatible)
theoneprobe(optional){modrinth:Eyw0UxEx}{curseforge:245211}
curseforge-id: 223794
curseforge-token: ${{ secrets.CURSEFORGE }}
loaders: neoforge
deploy-modmaven:
name: Deploy to Modmaven
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/gradle-setup
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: build-artifacts
- name: Unpack build artifact
run: tar axf build.tar.zst
- name: Validate artifacts exist
run: test -d ./build && test -d ./.gradle
- name: Publish to Modmaven
env:
MODMAVEN_USER: ${{ secrets.MODMAVEN_USER }}
MODMAVEN_PASSWORD: ${{ secrets.MODMAVEN_PASSWORD }}
run: ./gradlew publishMavenPublicationToModmavenRepository --no-daemon --max-workers 1
deploy-modrinth:
name: Deploy to Modrinth
needs: build
runs-on: ubuntu-latest
steps:
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: build-artifacts
- name: Unpack build artifact
run: tar axf build.tar.zst
- name: Validate artifacts exist
run: test -d ./build
- name: Upload to Modrinth
uses: Kir-Antipov/mc-publish@995edadc13559a8b28d0b7e6571229f067ec7659
with:
name: AE2 ${{ needs.build.outputs.VERSION }} [NEOFORGE]
version: ${{ needs.build.outputs.VERSION }}
files: ${{ needs.build.outputs.ARTIFACT_PATH }}
dependencies: |
jade(optional){modrinth:nvQzSEkH}{curseforge:324717}
wthit(optional){modrinth:6AQIaxuO}{curseforge:440979}
rei(optional){modrinth:nfn13YXA}{curseforge:310111}
jei(optional){modrinth:u6dRKJwZ}{curseforge:238222}
optifine(incompatible)
theoneprobe(optional){modrinth:Eyw0UxEx}{curseforge:245211}
modrinth-id: XxWD5pD3
modrinth-token: ${{ secrets.MODRINTH }}
loaders: neoforge