diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml new file mode 100644 index 0000000..b80eb5d --- /dev/null +++ b/.forgejo/workflows/build.yaml @@ -0,0 +1,33 @@ +on: + push: + tags: + - '*' + +jobs: + build: + runs-on: docker + + steps: + - name: checkout repository + uses: actions/checkout@v3 + + - name: make gradle wrapper executable + run: chmod +x ./gradlew + + - name: set up jdk + run: | + INSTALL_DIR="/opt/java" + mkdir -p "$INSTALL_DIR" + DOWNLOAD_URL="https://cdn.azul.com/zulu/bin/zulu21.40.17-ca-jdk21.0.6-linux_x64.tar.gz" + + echo "Downloading from $DOWNLOAD_URL" + curl -L "$DOWNLOAD_URL" | tar -xz -C "$INSTALL_DIR" + + - name: build + run: JAVA_HOME="/opt/java/zulu21.40.17-ca-jdk21.0.6-linux_x64" ./gradlew build + + - name: capture build artifacts + uses: https://code.forgejo.org/forgejo/upload-artifact@v3 + with: + name: Artifacts + path: 'build/libs'