Skip to content

Commit

Permalink
task: Added workflow for releasing new versions from GHA (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Kolstad authored Aug 21, 2023
1 parent 83e6fc0 commit 0374a86
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/release_to_central.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release to central

on:
workflow_dispatch:
inputs:
version:
description: What version would you like to use?

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
name: Checkout code
- name: Setup Java and Maven Central Repo
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
cache: maven
- name: Setup git config
run: |
git config user.name "Github Release Bot"
git config user.email "<>"
- name: Release
run: mvn -B -DreleaseVersion=${{ inputs.version}} release:prepare release:perform
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

0 comments on commit 0374a86

Please sign in to comment.