WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

chore: Merge back changes introduced in 1.2.1 #11

chore: Merge back changes introduced in 1.2.1

chore: Merge back changes introduced in 1.2.1 #11

Workflow file for this run

name: Build Mod
on:
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: "8"
distribution: "temurin"
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build with Gradle
run: ./gradlew build shadowJar
- name: Upload build artifacts
uses: actions/upload-artifact@v4
if: success()
with:
name: mobends-ci-build
path: build/libs/*-all.jar
retention-days: 30
- name: Comment PR with artifact URLs
if: success() && github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.runId,
});
let comment = '🦾 Fresh bends, straight out the oven, ready to be tested out:\n';
for (const artifact of artifacts.data.artifacts) {
const download_url = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}/artifacts/${artifact.id}`;
comment += `- [${artifact.name}](${download_url})\n`;
}
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: comment,
});
- name: Upload build artifacts (on failure)
uses: actions/upload-artifact@v4
if: failure()
with:
name: build-logs
path: |
build/logs/
.gradle/
retention-days: 7