Updated Upstream (Plazma) #9
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 Thunderbolt | |
on: | |
push: | |
branches: [ "base", "feat/**/*" ] | |
paths: | |
- "**.patch" | |
workflow_dispatch: | |
env: | |
ORG_NAME: PlazmaMC | |
MC_VERSION: 1.20.6 | |
jobs: | |
release: | |
name: Release | |
strategy: | |
matrix: | |
base_jdk: [21] | |
os: [ubuntu-22.04] | |
if: "!startsWith(github.event.commits[0].message, '[CI-Skip]')" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Setup Variables | |
id: setup | |
env: | |
BRANCH: ${{ github.ref_name }} | |
run: echo "branch=${BRANCH##*/}" >> $GITHUB_OUTPUT | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Validate Gradle Wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Set up GraalVM ${{ matrix.base_jdk }} | |
uses: graalvm/setup-graalvm@v1 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
java-version: ${{ matrix.base_jdk }} | |
version: latest | |
cache: 'gradle' | |
- name: Configure Git | |
run: git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" && git config --global user.name "github-actions[bot]" | |
- name: Apply Patches | |
run: ./gradlew applyPatches --stacktrace | |
- name: Build | |
run: ./gradlew build --stacktrace | |
- name: Create Reobf Jar | |
run: ./gradlew createReobfPaperclipJar --stacktrace | |
- name: Create Mojmap Jar | |
run: ./gradlew createMojmapPaperclipJar --stacktrace | |
- name: Release Artifacts (Latest/Stable) | |
if: github.ref_name == 'base' | |
uses: softprops/[email protected] | |
with: | |
name: "Base Release #${{ env.RELEASE }} for ${{ env.MC_VERSION }}" | |
tag_name: base/${{ env.MC_VERSION }}/latest | |
target_commitish: ${{ github.ref_name }} | |
generate_release_notes: true | |
fail_on_unmatched_files: true | |
files: build/libs/*.jar | |
- name: Release Artifacts | |
if: github.ref_name == 'base' | |
uses: softprops/[email protected] | |
with: | |
name: "Base Release #${{ env.RELEASE }} for ${{ env.MC_VERSION }}" | |
tag_name: base/${{ env.MC_VERSION }}/${{ env.RELEASE }} | |
target_commitish: ${{ github.ref_name }} | |
generate_release_notes: true | |
fail_on_unmatched_files: true | |
files: build/libs/*.jar | |
- name: Get Release Number | |
if: github.ref_name == 'base' | |
run: echo "RELEASE=$(git ls-remote --tags origin | grep "base/${{ env.MC_VERSION }}" | wc -l)" >> $GITHUB_ENV | |
- name: Release Artifacts (Latest/Flavor) | |
if: startsWith(github.ref_name, 'feat/') | |
uses: softprops/[email protected] | |
with: | |
name: "Flavor Release for ${{ env.MC_VERSION }}" | |
tag_name: github.ref_name | |
target_commitish: ${{ github.ref_name }} | |
generate_release_notes: true | |
fail_on_unmatched_files: true | |
files: build/libs/*.jar |