Skip to content

Disable C++ warning and fine tune CI script #2

Disable C++ warning and fine tune CI script

Disable C++ warning and fine tune CI script #2

name: Gradle Package
on:
push:
branches: [ main ]
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
types:
- opened
- synchronize
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Verify build for PR
run: ./gradlew check
if: github.event_name == 'pull_request'
- name: Gather version name from git describe
id: version
if: github.event_name == 'push'
run: echo version=$(git describe --tags --dirty) >> $GITHUB_OUTPUT
- name: Publish to GitHub Packages
if: github.event_name == 'push'
run: ./gradlew publish
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.version.outputs.version }}