-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (54 loc) · 1.79 KB
/
Copy pathrelease.yml
File metadata and controls
54 lines (54 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: release-project
on:
workflow_dispatch:
inputs:
since:
description: Base Version
required: true
version:
description: Bump Version
required: true
jobs:
release:
runs-on: ubuntu-latest
steps:
# Publish to Maven Central
- uses: actions/checkout@v2
- name: Set up maven settings.xml
id: setup_maven
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
server-id: oss.sonatype.org
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Set release version
id: set_version
run: mvn -Dstyle.color=never -U versions:set "-DnewVersion=${{ github.event.inputs.version }}"
- name: Publish to Maven Central
id: publish_package
run: mvn clean deploy -PmavenCentral
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASS }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
# Publish to Github
- name: Generate changelog
uses: heinrichreimer/github-changelog-generator-action@v2.1.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
sinceTag: ${{ github.event.inputs.since }}
- name: Create Release on Github
id: changelog
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.version }}
release_name: Release ${{ github.event.inputs.version }}
body: ${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: false