Skip to content

updating build config #4

updating build config

updating build config #4

Workflow file for this run

name: Java CI with Gradle
on:
push:
branches: [ main ]
tags: [ '*' ] # Trigger on all tags
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history and tags
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Publish to GitHub Packages
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
run: ./gradlew publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}