mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-29 11:49:19 +00:00
full .github dir update
This commit is contained in:
53
.github/workflows/build.yml
vendored
53
.github/workflows/build.yml
vendored
@@ -1,5 +1,11 @@
|
||||
name: Build
|
||||
name: Build DivineMC
|
||||
on: push
|
||||
|
||||
env:
|
||||
version: 1.19.2
|
||||
branch: ver/1.19.2
|
||||
debug: 'false'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -7,23 +13,50 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: gradle/wrapper-validation-action@v1
|
||||
- uses: actions/setup-java@v2
|
||||
- name:
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config --global user.email "no-reply@github.com"
|
||||
git config --global user.name "Github Actions"
|
||||
chmod +x gradlew
|
||||
|
||||
- name: Patch
|
||||
run: |
|
||||
./gradlew applyPatches --stacktrace
|
||||
run: ./gradlew applyPatches --stacktrace
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
./gradlew createReobfPaperclipJar --stacktrace
|
||||
- name: Archive Paperclip
|
||||
uses: actions/upload-artifact@v3.1.0
|
||||
run: ./gradlew build --stacktrace
|
||||
|
||||
- name: Create Reobf Jar
|
||||
run: ./gradlew createReobfPaperclipJar --stacktrace
|
||||
|
||||
- name: Upload Artifacts
|
||||
if: env.debug == 'true' || github.ref_name != env.branch
|
||||
uses: actions/upload-artifact@main
|
||||
with:
|
||||
name: DivineMC-1.19.2
|
||||
path: build/libs/DivineMC-paperclip-1.19.2-R0.1-SNAPSHOT-reobf.jar
|
||||
name: Artifacts
|
||||
path: build/libs
|
||||
|
||||
- name: Release Artifacts
|
||||
if: github.ref_name == env.branch
|
||||
uses: marvinpinto/action-automatic-releases@latest
|
||||
with:
|
||||
title: "Release #${{ env.workflow }}"
|
||||
automatic_release_tag: release-${{ env.workflow }}
|
||||
repo_token: "${{ secrets.REPO_TOKEN }}"
|
||||
files: build/libs/*.jar
|
||||
prerelease: false
|
||||
|
||||
- name: Release Artifacts (Latest)
|
||||
if: github.ref_name == env.branch
|
||||
uses: marvinpinto/action-automatic-releases@latest
|
||||
with:
|
||||
title: "Release #${{ env.workflow }}"
|
||||
automatic_release_tag: latest-${{ env.version }}
|
||||
repo_token: "${{ secrets.REPO_TOKEN }}"
|
||||
files: build/libs/*.jar
|
||||
prerelease: false
|
||||
Reference in New Issue
Block a user