This repository has been archived by the owner on Jun 14, 2024. It is now read-only.
v0.2.6 #13
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: Release | |
on: | |
release: | |
types: [ published ] | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Gradle | |
uses: null2264/actions/gradle-setup@6712f98d592b126629afd27dc4870c93b53426b4 | |
with: | |
java: 21 | |
- name: Build | |
run: ./gradlew build --stacktrace | |
- name: Archive build results | |
run: tar -I zstd -cf build.tar.zst versions/*/build/libs | |
- name: Upload build folder | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build-artifacts | |
path: build.tar.zst | |
if-no-files-found: error | |
retention-days: 3 | |
- name: Upload mod to CurseForge and Modrinth | |
run: ./gradlew publishMods --stacktrace | |
env: | |
CHANGELOG: ${{ github.event.release.body }} | |
CURSEFORGE: ${{ secrets.CURSEFORGE_API_KEY }} | |
MODRINTH: ${{ secrets.MODRINTH_TOKEN }} | |
upload-release-artifacts: | |
name: Upload Release Artifacts | |
needs: release | |
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 |