Skip to content

Commit

Permalink
Update build script
Browse files Browse the repository at this point in the history
  • Loading branch information
Grayray75 committed Aug 27, 2023
1 parent 31cdac9 commit 1e7a5fa
Show file tree
Hide file tree
Showing 9 changed files with 123 additions and 146 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
name: Build

on: [push, pull_request]

jobs:
build:
strategy:
matrix:
java: [17-jdk]
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
container:
image: eclipse-temurin:${{ matrix.java }}
image: eclipse-temurin:17-jdk
options: --user root
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: gradle/wrapper-validation-action@v1
- run: ./gradlew check build publishToMavenLocal --stacktrace --parallel --warning-mode=fail --refresh-dependencies
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: Artifacts
path: build/libs/
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: Artifacts
path: ./*/build/libs/
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: Maven Local
path: /root/.m2/repository
9 changes: 5 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
name: Release
on: [workflow_dispatch] # Manual trigger

on: [workflow_dispatch]

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
container:
image: eclipse-temurin:17-jdk
options: --user root
steps:
- run: apt update && apt install git -y && git --version
- run: git config --global --add safe.directory /__w/fabric/fabric
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: gradle/wrapper-validation-action@v1
- run: ./gradlew checkVersion build publish --stacktrace github curseforge modrinth
- run: ./gradlew checkVersion build publish github curseforge modrinth --stacktrace
env:
MAVEN_PUBLISH_CREDENTIALS: ${{ secrets.MAVEN_PUBLISH_CREDENTIALS }}
CURSE_API_KEY: ${{ secrets.CURSE_API_KEY }}
Expand Down

0 comments on commit 1e7a5fa

Please sign in to comment.