Use all new workfows

This commit is contained in:
AngrySoundTech
2023-12-16 11:39:05 -05:00
parent ffdeed7e53
commit 06c57ab846
6 changed files with 36 additions and 83 deletions

View File

@@ -1,33 +0,0 @@
name: Build
on:
push:
branches:
- '*'
pull_request:
types: [opened, synchronize, reopened]
jobs:
gradle_build:
name: Gradle Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Run Gradle Build
uses: gradle/gradle-build-action@v2
env:
CI: true
with:
arguments: 'reobf --scan'
- name: Upload Build Artifact
uses: actions/upload-artifact@v3
with:
name: gradle-build
path: '**/build/libs/*'

View File

@@ -1,13 +0,0 @@
name: Build Completed
on:
workflow_run:
types:
- "completed"
workflows:
- "Build"
jobs:
build_completed:
uses: CivMC/.github/.github/workflows/gradle_publish.yml@master
secrets: inherit

View File

@@ -0,0 +1,12 @@
name: PR Build
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
pr_updated:
uses: CivMC/.github/.github/workflows/gradle_build.yml@master
with:
gradle_task: reobf
secrets: inherit

View File

@@ -0,0 +1,13 @@
name: PR Build Completed
on:
workflow_run:
types:
- "completed"
workflows:
- "PR Build"
jobs:
build_completed:
uses: CivMC/.github/.github/workflows/comment_on_pr.yml@master
secrets: inherit

View File

@@ -1,37 +0,0 @@
name: Publish
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'temurin'
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
'**/.gradle'
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Publish
run: ./gradlew publish --stacktrace
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CIVMC_NEXUS_USER: ${{ secrets.CIVMC_NEXUS_USER }}
CIVMC_NEXUS_PASSWORD: ${{ secrets.CIVMC_NEXUS_PASSWORD }}

View File

@@ -0,0 +1,11 @@
name: Tag Created
on:
push:
tags:
- 'v*.*.*'
jobs:
tag_created:
uses: CivMC/.github/.github/workflows/gradle_publish.yml@master
secrets: inherit