Skip to content

nested components for blaster stats #843

nested components for blaster stats

nested components for blaster stats #843

Workflow file for this run

name: build
on:
pull_request:
push:
paths-ignore:
- resources/**
branches-ignore:
- l10n
permissions:
id-token: write
contents: read
jobs:
build:
strategy:
matrix:
# Use these Java versions
java: [
21, # Current Java LTS & minimum supported by Minecraft
]
runs-on: ubuntu-24.04
steps:
- name: checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
filter: tree:0
- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java }}
- name: setup python for uploader
if: github.ref == 'refs/heads/master'
uses: actions/setup-python@v5
with:
python-version : '3.12'
cache: pip
- name: cache loom-cache
uses: actions/cache@v4
with:
path: .gradle/loom-cache
key: loom-cache-${{ hashFiles('gradle.properties') }}
- name: setup gradle
uses: gradle/actions/setup-gradle@v4
- name: build
id: gradle
run: ./gradlew --stacktrace --parallel clean build
- name: Get Id Token
if: github.ref == 'refs/heads/master'
uses: actions/github-script@v7
id: idtoken
with:
script: |
let id_token = await core.getIDToken("https://mc.pswg.dev")
core.setOutput('id_token', id_token)
- name: upload
if: always() && github.ref == 'refs/heads/master' && (steps.gradle.outcome == 'success' || steps.gradle.outcome == 'failure')
continue-on-error: true
run: |
pip install -r scripts/requirements.txt
mkdir -p projects/pswg/build/libs
cd projects/pswg/build/libs
python ../../../../scripts/upload_dev.py --token ${{ steps.idtoken.outputs.id_token }} --result ${{ steps.gradle.outcome }} --webhook ${{ secrets.DISCORD_DEV_FEED_WEBHOOK }} --webhook ${{ secrets.DISCORD_RCOE_WEBHOOK }} --serverupdate ${{ secrets.SERVER_UPDATER }}
env:
BUILD_NUMBER: ${{ github.run_number }}