Skip to content

use clean build adn try --warning-mode all #6

use clean build adn try --warning-mode all

use clean build adn try --warning-mode all #6

Workflow file for this run

name: Publish and Release
on:
# release:
# types: [released, prereleased]
push:
tags:
- 'v*' # Triggers on tags like v1.0, v2.1, etc.
workflow_dispatch:
permissions:
contents: write
pull-requests: read
jobs:
build:
uses: ./.github/workflows/gradle.yml
publish:
needs: build
if: startsWith(github.ref, 'refs/tags/v')
name: Release build and publish to maven
runs-on: macOS-latest
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY_CONTENTS }}
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
- name: Clean Build
run: ./gradlew clean
- name: Publish to MavenCentral
run: ./gradlew publishAndReleaseToMavenCentral --no-configuration-cache --warning-mode all
github-release:
needs: publish # Runs only if Maven publish is successful
if: startsWith(github.ref, 'refs/tags/v')
runs-on: macOS-latest
name: Generate Release Notes
steps:
- name: Checkout Code
uses: actions/checkout@v4
# this will generate release notes using release-drafter and create a GitHub release draft
- name: Generate Changelog
uses: release-drafter/release-drafter@v5
with:
config-name: release-drafter.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# this will create a GitHub release from the generated release notes
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
body_path: RELEASE_NOTES.md # Uses generated notes from release-drafter
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}