Skip to content

Automatic bump after merge #37

Automatic bump after merge

Automatic bump after merge #37

Workflow file for this run

name: Deploy to maven repository after bump pom
on:
push:
tags:
- '*'
jobs:
deploy:
if: ${{ github.event.head_commit.message == 'Automatic bump after merge' && github.event.head_commit.committer.username == 'github-actions[bot]' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '17'
cache: 'maven'
server-username: SONATYPE_USERNAME
server-password: SONATYPE_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE
- name: Publish to Apache Maven Central
run: mvn clean -DskipTests deploy --settings .settings.xml -P release,ossrh
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Upload jars file
uses: actions/upload-artifact@v4
with:
name: jars
path: ./target/**/*.jar
retention-days: 5
release:
needs: deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: jars
- name: Retrieve the version
id: get-version
uses: JActions/[email protected]
- name: Create the release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: ${{ steps.get-version.outputs.version }}
prerelease: false
files: |
*.jar