Skip to content

Try fo fix: https://github.com/Euphillya/Insights-Folia/issues/2 #33

Try fo fix: https://github.com/Euphillya/Insights-Folia/issues/2

Try fo fix: https://github.com/Euphillya/Insights-Folia/issues/2 #33

Workflow file for this run

name: Gradle Build
on: [push, pull_request]
permissions: write-all
jobs:
build:
name: Build Insights on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'temurin'
- name: Grant execute permission to script
run: bash -c "chmod +x script.sh"
- name: Update upstream and apply patches
shell: bash
run: |
git config --global user.email "action@github.com"
git config --global user.name "Action Github"
./script.sh updateUpstream
./script.sh applyPatches
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: ${{ !(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/version/')) }}
- name: Execute Gradle build
run: |
cd Insights-Patchs
./gradlew build --stacktrace -x test -x checkstyleMain --refresh-dependencies
- uses: actions/upload-artifact@v4
name: Archive Reports
if: always()
with:
name: reports for ${{ matrix.os }}
path: 'Insights-Patchs/build/reports/**'
- uses: actions/upload-artifact@v4
name: Archive Logs
if: always()
with:
name: logs for ${{ matrix.os }}
path: 'Insights-Patchs/*.log'
- name: Upload Insights jar
uses: actions/upload-artifact@v4
with:
name: Insights-Folia-Snapshot
path: Insights-Patchs/jars/*
- name: Create Release
if: github.event_name != 'pull_request'
uses: ncipollo/release-action@v1
with:
tag: ${{ env.tag }}
name: ${{ env.project_id_b }} - ${{ github.run_number }}
body: |
This release is automatically compiled by GitHub Actions
### Commit Message
${{ env.commit_msg }}
artifacts: Insights-Patchs/jars/*.jar
generateReleaseNotes: true
prerelease: ${{ env.pre }}
makeLatest: ${{ env.make_latest }}
token: ${{ secrets.GITHUB_TOKEN }}
replacesArtifacts: false
env:
tag: build-${{ github.ref_name }}-${{ github.run_number }}
project_id_b: Insights-Folia
commit_id: ${{ github.sha }}
commit_msg: ${{ github.event.head_commit.message }}
pre: false
make_latest: true