Skip to content

15.3.2-beta for Fabric on Minecraft 1.20.1 #494

15.3.2-beta for Fabric on Minecraft 1.20.1

15.3.2-beta for Fabric on Minecraft 1.20.1 #494

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
run: ./gradlew build publish -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-fabric-${VERSION}.jar >> $GITHUB_OUTPUT
echo ARTIFACT_NAME=appliedenergistics2-fabric-${VERSION}.jar >> $GITHUB_OUTPUT
echo JAVADOC_PATH=./build/libs/appliedenergistics2-fabric-${VERSION}-javadoc.jar >> $GITHUB_OUTPUT
echo JAVADOC_NAME=appliedenergistics2-fabric-${VERSION}-javadoc.jar >> $GITHUB_OUTPUT
echo API_PATH=./build/libs/appliedenergistics2-fabric-${VERSION}-api.jar >> $GITHUB_OUTPUT
echo API_NAME=appliedenergistics2-fabric-${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 build/libs build/repo
- name: Upload build and gradle folders
uses: actions/upload-artifact@v3
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@v3
with:
name: build-artifacts
- name: Unpack build artifact
run: tar axf build.tar.zst
- name: Upload Release Artifact
uses: actions/[email protected]
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/[email protected]
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/[email protected]
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
permissions:
packages: write
steps:
- name: Download build artifact
uses: actions/download-artifact@v3
with:
name: build-artifacts
- name: Unpack build artifact
run: tar axf build.tar.zst
- name: Validate artifacts exist
run: test -d ./build
- name: Publish to Github Packages
uses: AppliedEnergistics/maven-publish-action@main
with:
local-repository-path: build/repo
remote-repository-url: https://maven.pkg.github.com/AppliedEnergistics/Applied-Energistics-2/
remote-repository-username: ${{ github.actor }}
remote-repository-password: ${{ github.token }}
deploy-curseforge:
name: Deploy to Curseforge
needs: build
runs-on: ubuntu-latest
steps:
- name: Download build artifact
uses: actions/download-artifact@v3
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@4db8bd126f74d5e143822181a2b1201308e2c796
with:
name: AE2 ${{ needs.build.outputs.VERSION }} [FABRIC]
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}
curseforge-id: 223794
curseforge-token: ${{ secrets.CURSEFORGE }}
deploy-modmaven:
name: Deploy to Modmaven
needs: build
runs-on: ubuntu-latest
steps:
- name: Download build artifact
uses: actions/download-artifact@v3
with:
name: build-artifacts
- name: Unpack build artifact
run: tar axf build.tar.zst
- name: Validate artifacts exist
run: test -d ./build
- name: Publish to Modmaven
uses: AppliedEnergistics/maven-publish-action@main
with:
local-repository-path: build/repo
remote-repository-url: https://modmaven.dev/artifactory/local-releases/
remote-repository-username: ${{ secrets.MODMAVEN_USER }}
remote-repository-password: ${{ secrets.MODMAVEN_PASSWORD }}
deploy-modrinth:
name: Deploy to Modrinth
needs: build
runs-on: ubuntu-latest
steps:
- name: Download build artifact
uses: actions/download-artifact@v3
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@4db8bd126f74d5e143822181a2b1201308e2c796
with:
name: AE2 ${{ needs.build.outputs.VERSION }} [FABRIC]
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}
modrinth-id: XxWD5pD3
modrinth-token: ${{ secrets.MODRINTH }}