mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-01 19:38:13 +03:00
65 lines
1.8 KiB
YAML
65 lines
1.8 KiB
YAML
name: Beatoraja IR CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "main"
|
|
paths:
|
|
- "java/beatoraja-ir/**"
|
|
- ".github/workflows/beatoraja-ir.yml"
|
|
|
|
pull_request:
|
|
branches:
|
|
- "main"
|
|
paths:
|
|
- "java/beatoraja-ir/**"
|
|
- ".github/workflows/beatoraja-ir.yml"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
|
|
with:
|
|
distribution: temurin
|
|
java-version: "17"
|
|
|
|
- name: Set up Gradle
|
|
uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
|
|
with:
|
|
cache-read-only: ${{ github.event_name == 'pull_request' }}
|
|
|
|
- name: Build shadow jar
|
|
working-directory: java/beatoraja-ir
|
|
run: ./gradlew --no-daemon shadowJar
|
|
env:
|
|
TCHIR_NAME: Bokutachi IR
|
|
TCHIR_HOME: https://boku.tachi.ac
|
|
TCHIR_BASE_URL: https://boku.tachi.ac
|
|
|
|
- name: Stash jar for upload
|
|
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' }}
|
|
run: |
|
|
mkdir -p /tmp/ir-jar
|
|
cp java/beatoraja-ir/build/libs/bokutachiIR-*-all.jar /tmp/ir-jar/
|
|
|
|
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' }}
|
|
with:
|
|
name: bokutachiIR-jar
|
|
path: /tmp/ir-jar/bokutachiIR-*-all.jar
|
|
retention-days: 7
|
|
if-no-files-found: error
|