Update .forgejo/workflows/action.yml

Signed-off-by: moonleay <account@moonleay.net>
This commit is contained in:
moonleay 2023-08-12 13:47:55 +02:00 committed by moonleay
parent b8915cfefa
commit 9c27e13ec6
Signed by: moonleay
GPG key ID: 82667543CCD715FB

View file

@ -1,22 +1,25 @@
on: [ push ]
name: Build Gradle project
on:
push:
jobs:
build_and_publish:
runs-on: docker
container:
image: gradle
build-gradle-project:
runs-on: ubuntu-latest
steps:
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build and Package JAR with Gradle
uses: docker://gradle:latest # Use the official Gradle Docker image
with:
args: shadowJar
- name: Clean Caches
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
- name: apt 1
run: apt update
- name: apt 2
run: apt upgrade -y
- 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:
name: lilJudd.jar
path: build/libs/