Skip to content

build: upgrade gradle 8.11.1 #61

build: upgrade gradle 8.11.1

build: upgrade gradle 8.11.1 #61

Workflow file for this run

name: Build
on:
push:
tags:
- 'v0.*'
- 'v1.*'
branches:
- 'master'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version-file: '.java-version'
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3
with:
cache-encryption-key: ${{ secrets.GradleEncryptionKey }}
validate-wrappers: true
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
build-scan-terms-of-use-agree: "yes"
- name: Run build
run: ./gradlew build
- name: Store GPG key
run: echo "${{ secrets.GPG_PK }}" | base64 --decode | gpg --import
- name: Publish to Maven Central
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
run: ./gradlew publish -Psigning.gnupg.keyName=pub@iseki.space
- name: Publish to Maven Central(Tagged)
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
run: |
VERSION=${{ github.ref_name }}
./gradlew publish -Psigning.gnupg.keyName=pub@iseki.space -Pversion=${VERSION:1}