Skip to content

Commit ce690b1

Browse files
authored
lifting github workflows to 2.4 (#335)
1 parent 7d2b723 commit ce690b1

File tree

4 files changed

+94
-1
lines changed

4 files changed

+94
-1
lines changed

.github/release-drafter-config.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name-template: 'Version $NEXT_PATCH_VERSION🌈'
2+
tag-template: 'v$NEXT_PATCH_VERSION'
3+
categories:
4+
- title: '🚀Features'
5+
labels:
6+
- 'feature'
7+
- 'enhancement'
8+
- title: 'Bug Fixes'
9+
labels:
10+
- 'fix'
11+
- 'bugfix'
12+
- 'bug'
13+
- title: '🧰Maintenance'
14+
label: 'chore'
15+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
16+
exclude-labels:
17+
- 'skip-changelog'
18+
template: |
19+
## Changes
20+
21+
$CHANGES

.github/workflows/release-drafter.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
# branches to consider in the event; optional, defaults to all
6+
branches:
7+
- master
8+
9+
jobs:
10+
update_release_draft:
11+
runs-on: ubuntu-latest
12+
steps:
13+
# Drafts your next Release notes as Pull Requests are merged into "master"
14+
- uses: release-drafter/release-drafter@v5
15+
with:
16+
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
17+
config-name: release-drafter-config.yml
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- name: get version from tag
15+
id: get_version
16+
run: |
17+
realversion="${GITHUB_REF/refs\/tags\//}"
18+
realversion="${realversion//v/}"
19+
realversion=`echo ${realversion}|cut -d '-' -f 2-2`
20+
echo "::set-output name=VERSION::$realversion"
21+
22+
- name: Set up publishing to maven central
23+
uses: actions/setup-java@v2
24+
with:
25+
java-version: '8'
26+
distribution: 'adopt'
27+
server-id: ossrh
28+
server-username: MAVEN_USERNAME
29+
server-password: MAVEN_PASSWORD
30+
31+
- name: mvn versions
32+
run: mvn versions:set -DnewVersion=${{ steps.get_version.outputs.VERSION }}
33+
34+
- name: Install gpg key
35+
run: |
36+
cat <(echo -e "${{ secrets.OSSH_GPG_SECRET_KEY }}") | gpg --batch --import
37+
gpg --list-secret-keys --keyid-format LONG
38+
39+
- name: Publish
40+
run: |
41+
mvn --no-transfer-progress \
42+
--batch-mode \
43+
-Dgpg.passphrase='${{ secrets.OSSH_GPG_SECRET_KEY_PASSWORD }}' \
44+
-DskipTests deploy -P release
45+
env:
46+
MAVEN_USERNAME: ${{secrets.OSSH_USERNAME}}
47+
MAVEN_PASSWORD: ${{secrets.OSSH_TOKEN}}

pom.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,13 @@
370370
<plugin>
371371
<groupId>org.apache.maven.plugins</groupId>
372372
<artifactId>maven-gpg-plugin</artifactId>
373-
<version>1.5</version>
373+
<version>3.0.1</version>
374+
<configuration>
375+
<gpgArguments>
376+
<arg>--pinentry-mode</arg>
377+
<arg>loopback</arg>
378+
</gpgArguments>
379+
</configuration>
374380
<executions>
375381
<execution>
376382
<id>sign-artifacts</id>

0 commit comments

Comments
 (0)