8000 add pipeline config to create Maven releases (#99) · localstack/localstack-java-utils@1c728ef · GitHub
[go: up one dir, main page]

Skip to content

Commit 1c728ef

Browse files
authored
add pipeline config to create Maven releases (#99)
1 parent 4cf2b12 commit 1c728ef

File tree

3 files changed

+49
-1
lines changed

3 files changed

+49
-1
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: CI Build
22

33
on:
44
push:

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Maven Release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:< 8000 /div>
8+
name: Release to Maven Central
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Set up JDK
13+
uses: actions/setup-java@v2
14+
with:
15+
distribution: "adopt"
16+
java-version: "8"
17+
18+
- name: Set up credentials
19+
env:
20+
MAVEN_GPG_KEY: ${{ secrets.MAVEN_GPG_KEY }}
21+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
22+
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
23+
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
24+
run: |
25+
mkdir -p ~/.m2
26+
cat <<EOT > ~/.m2/settings.xml
27+
<settings>
28+
<servers>
29+
<server>
30+
<id>ossrh</id>
31+
<username>${MAVEN_USERNAME}</username>
32+
<password>${MAVEN_PASSWORD}</password>
33+
</server>
34+
</servers>
35+
</settings>
36+
EOT
37+
38+
export GPG_TTY=$(tty)
39+
echo -e "$MAVEN_GPG_KEY" | sed 's/\$/\n/' > /tmp/maven.gpg
40+
gpg --no-tty --pinentry-mode loopback --passphrase $MAVEN_GPG_PASSPHRASE --import /tmp/maven.gpg
41+
gpg -ab --no-tty --pinentry-mode loopback --passphrase $MAVEN_GPG_PASSPHRASE /tmp/maven.gpg
42+
43+
- name: Maven Publish
44+
run: make publish-maven

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ To build the latest version of the code via Maven:
106106
make build
107107
```
108108

109+
### Releasing
110+
111+
To publish a release of the library, the "Maven Release" Github Action can be manually triggered in the repository, which will take the latest code on `master` branch and publish it to Maven Central.
112+
109113
## Change Log
110114

111115
* v0.2.22: Fix sqs event mapping for new event format, some test fixes

0 commit comments

Comments
 (0)
0