Port to Minecraft 1.21.2 #22
Workflow file for this run
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: Upload Release Artifacts | |
on: | |
push: | |
tags: | |
- '*' | |
env: | |
TAG: ${{ github.ref_name }} | |
BUILD_NUMBER: ${{ github.run_number }} | |
jobs: | |
publish: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'microsoft' | |
java-version: 21 | |
- name: Copy Maven Upload URL | |
id: extract_maven_upload_url | |
run: echo "maven_upload_url=${{ secrets.MAVEN_UPLOAD_URL }}" >> $GITHUB_OUTPUT | |
- name: Build with Gradle | |
run: ./gradlew assemble --rerun-tasks | |
- name: Maven Release | |
if: steps.extract_maven_upload_url.outputs.maven_upload_url | |
env: | |
MAVEN_UPLOAD_URL: ${{ secrets.MAVEN_UPLOAD_URL }} | |
MAVEN_UPLOAD_USERNAME: ${{ secrets.MAVEN_UPLOAD_USERNAME }} | |
MAVEN_UPLOAD_PASSWORD: ${{ secrets.MAVEN_UPLOAD_PASSWORD }} | |
run: ./gradlew publish | |
- name: Detonate JARs | |
run: python ./ci/hissboom.py "./build/libs/*.jar" | |
- name: Publish (GitHub Releases) | |
id: publish_github | |
uses: Kir-Antipov/mc-publish@995edadc13559a8b28d0b7e6571229f067ec7659 # (new) v3.3.0 | |
with: | |
github-token: ${{ github.token }} | |
version: ${{ env.TAG }} | |
files: | | |
build/libs/!(*-@(dev|sources|javadoc|slim)).jar | |
build/libs/*-@(sources|javadoc).jar | |
- name: Publish (Fabric) | |
id: publish_fabric | |
uses: Kir-Antipov/mc-publish@995edadc13559a8b28d0b7e6571229f067ec7659 # (new) v3.3.0 | |
with: | |
modrinth-token: ${{ secrets.MODRINTH_TOKEN }} | |
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} | |
version: ${{ env.TAG }}+Fabric | |
files: | | |
build/libs/!(*-@(dev|sources|javadoc|slim)).jar | |
build/libs/*-@(sources|javadoc).jar | |
- name: Notify Discord | |
uses: Up-Mods/action-discord-release@main | |
with: | |
version: ${{ github.ref_name }} | |
webhook-url: ${{ secrets.ANNOUNCEMENT_WEBHOOK_URL }} | |
curseforge-project-id: ${{ steps.publish_fabric.outputs.curseforge-id }} | |
modrinth-project-id: ${{ steps.publish_fabric.outputs.modrinth-id }} | |
thumbnail-url: https://mod-assets.upcraft.dev/promo/ok-zoomer/icon_128x.png |