v5.2.0 #29
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
# Automatically build the project and run any configured tests for every push | |
# and submitted pull request. This can help catch issues that only occur on | |
# certain platforms or Java versions, and provides a first line of defence | |
# against bad commits. | |
name: release | |
on: | |
release: | |
types: [ published ] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: gradle/wrapper-validation-action@v1 | |
- name: Setup JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: "temurin" | |
java-version: 17 | |
- run: chmod +x ./gradlew | |
- name: Build with Gradle | |
run: ./gradlew build --stacktrace | |
- name: Archive build results | |
run: tar -I zstd -cf build.tar.zst versions/*/build/libs | |
- 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: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: | | |
versions/*/build/libs/!(*-dev-shade|*-sources).jar | |
deploy-mod: | |
name: Deploy Mod | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: gradle/wrapper-validation-action@v1 | |
- name: Setup JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: "temurin" | |
java-version: 17 | |
- run: chmod +x ./gradlew | |
- name: Build with Gradle | |
run: ./gradlew build --stacktrace | |
- name: Upload to CurseForge and Modrinth | |
env: | |
CHANGELOG: ${{ github.event.release.body }} | |
CURSEFORGE: ${{ secrets.CURSEFORGE }} | |
MODRINTH: ${{ secrets.MODRINTH }} | |
run: ./gradlew publishMods --stacktrace --no-daemon --max-workers 1 |