-
Notifications
You must be signed in to change notification settings - Fork 14
49 lines (42 loc) · 1.65 KB
/
ci-snapshot.yml
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
name: CI-Snapshot
on:
push:
tags:
- '*-SNAPSHOT'
jobs:
publish-snapshot-sonatype:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: current
- name: Get Project version
id: get_version
run: echo VERSION=$(gradle properties --no-daemon --console=plain -q | grep "^version:" | awk '{printf $2}') >> "$GITHUB_OUTPUT"
- name: Decode
run: |
echo "${{secrets.SIGNING_SECRET_KEY_RING_FILE}}" > /tmp/secring.gpg.b64
base64 -d /tmp/secring.gpg.b64 > /tmp/secring.gpg
- name: Publish Snapshot to Sonatype
uses: gradle/gradle-build-action@v2
with:
gradle-version: current
arguments: assemble publish -Psigning.keyId=${{secrets.SIGNING_KEY_ID}} -Psigning.password=${{secrets.SIGNING_PASSWORD}} -Psigning.secretKeyRingFile=/tmp/secring.gpg -PossrhUsername=${{secrets.SONATYPE_NEXUS_USERNAME}} -PossrhPassword=${{secrets.SONATYPE_NEXUS_PASSWORD}} --stacktrace
- name: Create Release in Github
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.get_version.outputs.VERSION }}
name: ${{ steps.get_version.outputs.VERSION }}
generate_release_notes: true
body: |
Available in Sonatype SNAPSHOTs repository under:
`io.reactiverse:aws-sdk:${{ steps.get_version.outputs.VERSION }}`
draft: true
prerelease: true