Skip to content

remove label waiting for author feedback if issue closes (#2061) #576

remove label waiting for author feedback if issue closes (#2061)

remove label waiting for author feedback if issue closes (#2061) #576

name: Maven Preview/Release and Github Release
on:
push:
branches: [main]
paths-ignore:
- '.gradle/wrapper'
- '.gitignore'
- 'LICENSE'
- 'THIRD PARTY NOTICES'
- '*.md'
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
workflow_dispatch:
env:
PREVIEW_TASK: publishSnapshotPublicationToSonatypeSnapshotRepository
PUBLISH_TASK: publishMavenCentralReleasePublicationToSonatypeRepository
permissions:
contents: write
jobs:
maven_Preview:
if: ${{ github.ref == 'refs/heads/main' }}
environment:
name: maven_central_snapshot
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'temurin'
cache: gradle
- name: Easy detect-secrets
uses: RobertFischer/[email protected]
- name: Download File
run: .\Scripts\decodeAndWrite.ps1 -encodedValue $env:ENCODED_VALUE -outputPath $env:OUTPUT_PATH
shell: pwsh
env:
ENCODED_VALUE: ${{ secrets.LOCAL_PROPERTIES }}
OUTPUT_PATH: '.\local.properties'
- name: Download File
run: .\Scripts\decodeAndWrite.ps1 -encodedValue $env:ENCODED_VALUE -outputPath $env:OUTPUT_PATH
shell: pwsh
env:
ENCODED_VALUE: ${{ secrets.SECRING_GPG }}
OUTPUT_PATH: '.\secring.gpg'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Publish
run: ./gradlew $PREVIEW_TASK
maven_Release:
if: ${{ startsWith(github.ref, 'refs/tags/') && github.actor == 'release-please[bot]'}}
environment:
name: maven_central_release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'temurin'
cache: gradle
- name: Easy detect-secrets
uses: RobertFischer/[email protected]
- name: Download File
run: .\Scripts\decodeAndWrite.ps1 -encodedValue $env:ENCODED_VALUE -outputPath $env:OUTPUT_PATH
shell: pwsh
env:
ENCODED_VALUE: ${{ secrets.LOCAL_PROPERTIES }}
OUTPUT_PATH: '.\local.properties'
- name: Download File
run: .\Scripts\decodeAndWrite.ps1 -encodedValue $env:ENCODED_VALUE -outputPath $env:OUTPUT_PATH
shell: pwsh
env:
ENCODED_VALUE: ${{ secrets.SECRING_GPG }}
OUTPUT_PATH: '.\secring.gpg'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Publish
run: ./gradlew $PUBLISH_TASK
- name: Upload Build Artifact
uses: actions/upload-artifact@v4
with:
name: drop
path: |
**/libs/*
build/generated-pom.xml
build/generated-pom.xml.asc
build.gradle
gradlew
gradlew.bat
settings.gradle
gradle.properties
**/gradle/**
Scripts/**
- name: GitHub Release
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
fail_on_unmatched_files: true
files: |
build/**/*.jar