Skip to content

Add slack message

Add slack message #8

Workflow file for this run

name: Deploy lib to Maven Central
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: '17'
- name: Publish to Maven Central
run: |
./gradlew --stacktrace publishAndReleaseToMavenCentral \
-PsigningInMemoryKey=$GPG_KEY \
-PsigningInMemoryKeyPassword=$GPG_PASSWORD \
-PmavenCentralUsername=$MAVEN_USERNAME \
-PmavenCentralPassword=$MAVEN_PASSWORD
env:
GPG_KEY: ${{ secrets.ANDROID_GPG_KEY }}
GPG_PASSWORD: ${{ secrets.ANDROID_SIGNING_PASSWORD }}
MAVEN_USERNAME: ${{ secrets.ANDROID_OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.ANDROID_OSSRH_PASSWORD }}
- name: Prepare Slack notification message
id: prepare_slack_message
run: |
wget https://raw.githubusercontent.com/AckeeCZ/android-github-actions-scripts/master/slack/prepare_slack_msg.sh
chmod u+x prepare_slack_msg.sh
./prepare_slack_msg.sh
- name: Send Slack notification
uses: rtCamp/action-slack-notify@v2
if: ${{ job.status == 'success' }}
env:
SLACK_WEBHOOK: ${{ secrets.ANDROID_OSS_NOTIFICATION_WEBHOOK }}
SLACK_USERNAME: 'github-snitch'
SLACK_ICON_EMOJI: ':octocat:'
SLACK_TITLE: ${{ steps.prepare_slack_message.outputs.SLACK_MSG_TITLE }}
SLACK_MESSAGE: ${{ steps.prepare_slack_message.outputs.SLACK_MSG }}
MSG_MINIMAL: true