Merge pull request #81 from DeployGate/jmatsu/bump/4.7.0 #10
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release artifacts | |
on: | |
push: | |
branches-ignore: | |
- '**' | |
tags: | |
- \d.\d.\d | |
- \d.\d.\d-(alpha|rc)\d | |
jobs: | |
production-release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: '17.x' | |
java-package: jdk | |
distribution: 'temurin' | |
cache: 'gradle' | |
- 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_USERNAME }} | |
NEXUS_PASSWORD=${{ secrets.SHARED_NEXUS_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 }} |