forked from aws-powertools/powertools-lambda-java
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (37 loc) · 1.35 KB
/
publish.yml
File metadata and controls
37 lines (37 loc) · 1.35 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
name: Publish package to the Maven Central Repository
on:
release:
types:
- published
workflow_dispatch: {}
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Maven Central Repository
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: 8
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }} # Value of the GPG private key to import
gpg-passphrase: GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: Set release notes tag
run: |
RELEASE_TAG_VERSION=${{ github.event.release.tag_name }}
echo "RELEASE_TAG_VERSION=${RELEASE_TAG_VERSION:1}" >> $GITHUB_ENV
- name: Publish package
run: mvn -Prelease clean deploy -DskipTests
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_JIRA_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_JIRA_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Close issues related to this release
uses: actions/github-script@v5
with:
script: |
const post_release = require('.github/workflows/post_release.js')
await post_release({github, context, core})