forked from DiscordBots/lilJudd
Update .forgejo/workflows/action.yml
Signed-off-by: moonleay <account@moonleay.net>
This commit is contained in:
parent
b8915cfefa
commit
9c27e13ec6
1 changed files with 23 additions and 20 deletions
|
@ -1,22 +1,25 @@
|
||||||
on: [ push ]
|
name: Build Gradle project
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_and_publish:
|
build-gradle-project:
|
||||||
runs-on: docker
|
runs-on: ubuntu-latest
|
||||||
container:
|
|
||||||
image: gradle
|
|
||||||
steps:
|
steps:
|
||||||
steps:
|
- name: apt 1
|
||||||
- name: Checkout code
|
run: apt update
|
||||||
uses: actions/checkout@v2
|
- name: apt 2
|
||||||
- name: Build and Package JAR with Gradle
|
run: apt upgrade -y
|
||||||
uses: docker://gradle:latest # Use the official Gradle Docker image
|
- name: install prerequisits
|
||||||
|
run: apt install openjdk-17-jdk ca-certificates-java ssl-cert openssl ca-certificates -y
|
||||||
|
- name: Checkout project sources
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Setup Gradle
|
||||||
|
uses: gradle/gradle-build-action@v2
|
||||||
|
- name: Run build with Gradle Wrapper
|
||||||
|
run: ./gradlew shadowJar
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
args: shadowJar
|
name: lilJudd.jar
|
||||||
- name: Clean Caches
|
path: build/libs/
|
||||||
run: |
|
|
||||||
rm -f .gradle/caches/modules-2/modules-2.lock
|
|
||||||
rm -fr .gradle/caches/*/plugin-resolution/
|
|
||||||
- name: Run shadowJar
|
|
||||||
run: gradle shadowJar
|
|
||||||
- name: Run publish
|
|
||||||
run: gradle publish
|
|
Loading…
Reference in a new issue