mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-19 14:59:25 +00:00
update .github dir
This commit is contained in:
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
@@ -1,2 +0,0 @@
|
||||
* @BX-Team/bx-team-maintainers
|
||||
/.github/CODEOWNERS @BX-Team/bx-team-maintainers
|
||||
82
.github/workflows/build-1214.yml
vendored
Normal file
82
.github/workflows/build-1214.yml
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
name: Build DivineMC 1.21.4
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "master"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: blacksmith-8vcpu-ubuntu-2204
|
||||
if: "!contains(github.event.commits[0].message, '[ci-skip]')"
|
||||
env:
|
||||
BUILD_NUMBER: ${{ github.run_number }}
|
||||
outputs:
|
||||
build_number: ${{ env.BUILD_NUMBER }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Gradle Cache
|
||||
uses: useblacksmith/cache@v5
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches/modules-2
|
||||
~/.gradle/caches/jars-*
|
||||
~/.gradle/caches/transforms-*
|
||||
~/.gradle/wrapper
|
||||
~/.gradle/build-cache-*
|
||||
~/.gradle/configuration-cache-*
|
||||
.gradle/patchCache
|
||||
.gradle/patched
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'patches/**/*.patch') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
|
||||
- name: Gradle Cache Cleanup
|
||||
run: |
|
||||
mkdir -p ~/.gradle/caches/modules-2
|
||||
[ -f ~/.gradle/caches/modules-2/modules-2.lock ] && rm -f ~/.gradle/caches/modules-2/modules-2.lock
|
||||
find ~/.gradle/caches -name "*.lock" -type f -delete || echo "No lock files found"
|
||||
|
||||
- name: Setup JDK 21
|
||||
uses: useblacksmith/setup-java@v5
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 21
|
||||
|
||||
- name: Configure Git and Gradle
|
||||
run: |
|
||||
git config --global user.email "no-reply@github.com"
|
||||
git config --global user.name "Github Actions"
|
||||
git config --global core.preloadindex true
|
||||
git config --global core.fscache true
|
||||
git config --global gc.auto 256
|
||||
chmod +x gradlew
|
||||
|
||||
- name: Apply Patches
|
||||
run: |
|
||||
PARALLELISM=$(($(nproc) * 2))
|
||||
./gradlew applyAllPatches --stacktrace --parallel --max-workers=$PARALLELISM --build-cache --no-daemon
|
||||
|
||||
- name: Build Paperclip Jar
|
||||
run: ./gradlew createMojmapPaperclipJar --stacktrace --parallel --no-daemon
|
||||
|
||||
- name: Prepare Release Info
|
||||
run: bash scripts/releaseInfo.sh
|
||||
env:
|
||||
BUILD_NUMBER: ${{ env.BUILD_NUMBER }}
|
||||
|
||||
- name: Create Release
|
||||
uses: ncipollo/release-action@v1.15.0
|
||||
with:
|
||||
artifacts: ${{ env.jar }}
|
||||
bodyFile: ${{ env.info }}
|
||||
tag: ${{ env.tag }}
|
||||
name: ${{ env.name }}
|
||||
prerelease: ${{ env.experimental }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
makeLatest: ${{ env.make_latest }}
|
||||
62
.github/workflows/build.yml
vendored
62
.github/workflows/build.yml
vendored
@@ -1,62 +0,0 @@
|
||||
name: DivineMC CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "master"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: blacksmith-8vcpu-ubuntu-2204
|
||||
if: "!contains(github.event.commits[0].message, '[ci-skip]')"
|
||||
steps:
|
||||
- name: Setup Action
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
with:
|
||||
add-job-summary: never
|
||||
generate-job-summary: false
|
||||
cache-read-only: false
|
||||
|
||||
- name: Setup JDK 21
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 21
|
||||
|
||||
- name: Configure Git and Gradle
|
||||
run: |
|
||||
git config --global user.email "no-reply@github.com" && git config --global user.name "Github Actions"
|
||||
echo "BUILD_NUMBER=$GITHUB_RUN_NUMBER" >> $GITHUB_ENV
|
||||
chmod +x gradlew
|
||||
|
||||
- name: Patch
|
||||
run: ./gradlew applyAllPatches --stacktrace
|
||||
|
||||
- name: Build Paperclip Jar
|
||||
run: ./gradlew createMojmapPaperclipJar --stacktrace
|
||||
|
||||
- name: Publish API
|
||||
continue-on-error: true
|
||||
run: ./gradlew publish -PdivinemcUsername=${{ secrets.REPO_USERNAME }} -PdivinemcPassword=${{ secrets.REPO_SECRET }}
|
||||
|
||||
- name: Get Release Info
|
||||
run: bash scripts/releaseInfo.sh
|
||||
env:
|
||||
BUILD_NUMBER: ${{ env.BUILD_NUMBER }}
|
||||
|
||||
- name: Create Release
|
||||
uses: ncipollo/release-action@v1.15.0
|
||||
with:
|
||||
artifacts: ${{ env.jar }}
|
||||
bodyFile: ${{ env.info }}
|
||||
tag: ${{ env.tag }}
|
||||
name: ${{ env.name }}
|
||||
prerelease: ${{ env.experimental }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
makeLatest: ${{ env.make_latest }}
|
||||
44
.github/workflows/publish-api.yml
vendored
Normal file
44
.github/workflows/publish-api.yml
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
name: Publish API
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@main
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup JDK 21
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 21
|
||||
cache: gradle
|
||||
|
||||
- name: Configure Git and Gradle
|
||||
run: |
|
||||
git config --global user.email "no-reply@github.com" && git config --global user.name "Github Actions"
|
||||
chmod +x gradlew
|
||||
|
||||
- name: Apply patches
|
||||
run: |
|
||||
PARALLELISM=$(($(nproc) * 2))
|
||||
./gradlew applyAllPatches --stacktrace --parallel --max-workers=$PARALLELISM --build-cache --no-daemon
|
||||
|
||||
- name: Build
|
||||
run: ./gradlew build -x test
|
||||
|
||||
- name: Publish API
|
||||
continue-on-error: true
|
||||
run: |
|
||||
./gradlew :divinemc-api:publish
|
||||
./gradlew publishDevBundlePublicationToDivinemcRepository -PpublishDevBundle=true
|
||||
env:
|
||||
REPO_USERNAME: ${{ secrets.REPO_USERNAME }}
|
||||
REPO_PASSWORD: ${{ secrets.REPO_SECRET }}
|
||||
42
.github/workflows/test.yml
vendored
42
.github/workflows/test.yml
vendored
@@ -1,42 +0,0 @@
|
||||
name: DivineMC Test CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore: [ master ]
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: blacksmith-8vcpu-ubuntu-2204
|
||||
if: "!contains(github.event.commits[0].message, '[ci-skip]')"
|
||||
steps:
|
||||
- name: Setup Action
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/gradle-build-action@v2
|
||||
|
||||
- name: Setup JDK 21
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 21
|
||||
cache: 'gradle'
|
||||
|
||||
- name: Configure Git and Gradle
|
||||
run: |
|
||||
git config --global user.email "no-reply@github.com" && git config --global user.name "Github Actions"
|
||||
chmod +x gradlew
|
||||
|
||||
- name: Patch
|
||||
run: ./gradlew applyAllPatches --stacktrace
|
||||
|
||||
- name: Build Paperclip Jar
|
||||
run: ./gradlew createMojmapPaperclipJar --stacktrace
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@main
|
||||
with:
|
||||
name: DivineMC
|
||||
path: divinemc-server/build/libs/divinemc-paperclip-*-mojmap.jar
|
||||
Reference in New Issue
Block a user