Skip to content

Commit df230a6

Browse files
committed
fix: release to maven central (wrong copy :))
1 parent 57bbc0c commit df230a6

File tree

2 files changed

+50
-33
lines changed

2 files changed

+50
-33
lines changed

.github/workflows/release-action.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: release-to-maven-central
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
releaseversion:
6+
description: 'Release version'
7+
required: true
8+
default: '1.0.0'
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- run: |
15+
echo "Release version ${{ github.event.inputs.releaseversion }}!"
16+
17+
- uses: actions/checkout@v2
18+
19+
- name: Set up Maven Central Repository
20+
uses: actions/setup-java@v1
21+
with:
22+
java-version: 8
23+
server-id: ossrh
24+
server-username: MAVEN_USERNAME
25+
server-password: MAVEN_PASSWORD
26+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
27+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
28+
29+
- name: Set projects Maven version to GitHub Action GUI set version
30+
run: mvn versions:set "-DnewVersion=${{ github.event.inputs.releaseversion }}"
31+
32+
- name: Publish package
33+
run: mvn --batch-mode clean deploy -P release -DskipTests=true
34+
env:
35+
MAVEN_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }}
36+
MAVEN_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }}
37+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
38+
39+
- name: Create GitHub Release
40+
id: create_release
41+
uses: actions/create-release@v1
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
with:
45+
tag_name: ${{ github.event.inputs.releaseversion }}
46+
release_name: ${{ github.event.inputs.releaseversion }}
47+
body: |
48+
New version ${{ github.event.inputs.releaseversion }} published
49+
draft: false
50+
prerelease: false

0 commit comments

Comments
 (0)