-
Notifications
You must be signed in to change notification settings - Fork 8
45 lines (43 loc) · 1.65 KB
/
release.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
name: Release artifacts
on:
push:
branches-ignore:
- '**'
tags:
- \d.\d.\d
- \d.\d.\d-(alpha|rc)\d
jobs:
production-release:
runs-on: ubuntu-latest
env:
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx4g -XX:MaxMetaspaceSize=2g -Dkotlin.daemon.jvm.options=-Xmx1536m"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '17.x'
java-package: jdk
distribution: 'temurin'
cache: 'gradle'
- uses: gradle/actions/setup-gradle@v3
- run: RELEASE_VERSION="${GITHUB_REF#refs/tags/}" ./gradlew verifyReleaseVersion
- name: Set up gradle.properties for sigining and nexus
# Add timeout setting due to https://github.com/DeployGate/gradle-deploygate-plugin/runs/2523846388
run: |
echo >> gradle.properties
cat<<EOF >> gradle.properties
systemProp.org.gradle.internal.http.socketTimeout=120000
NEXUS_USERNAME=${{ secrets.SHARED_NEXUS_TOKEN_USERNAME }}
NEXUS_PASSWORD=${{ secrets.SHARED_NEXUS_TOKEN_PASSWORD }}
EOF
- name: Publish artifacts
run: ./scripts/release.sh
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSPHRASE }}
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_TITLE: 'Android SDK Release'
SLACK_MESSAGE: "${{ github.ref }} has been published to Sonatype. ref: https://oss.sonatype.org/"
SLACK_WEBHOOK: ${{ secrets.SHARED_FOR_RELEASE_ARTIFACT_SLACK_INCOMING_WEBHOOK_URL }}