Skip to content

ci: release version 0.28.0 🎉 #6

ci: release version 0.28.0 🎉

ci: release version 0.28.0 🎉 #6

Workflow file for this run

# Copyright 2023 The original authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: Deploy Maven Central
on:
push:
tags:
- 'v*'
env:
JAVA_VERSION: '17'
JAVA_DISTRO: 'zulu'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: 'Checkout GitHub repository'
uses: actions/checkout@v4
with:
clean: true
- name: 'Import GPG key'
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: 'Set up Java'
uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRO }}
check-latest: true
cache: maven
- name: 'Grant execute permission to MVN Wrapper'
run: chmod +x ./mvnw
- name: 'Set env VERSION'
run: |
VERSION=$(./mvnw org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: 'Set up Maven settings'
run: |
echo "<settings><interactiveMode>false</interactiveMode><servers><server><id>ossrh</id><username>${{ secrets.OSSRH_USERNAME }}</username><password>${{ secrets.OSSRH_PASSWORD }}</password></server></servers></settings>" > ./settings.xml
- name: 'Deploy Maven Central'
run: |
./mvnw -s ./settings.xml deploy -Possrh