Publish SDK #153
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: Publish SDK | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'sdks/**' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Publish SDKs | |
env: | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
MAVEN_SECRING_GPG_BASE64: ${{ secrets.MAVEN_SECRING_GPG_BASE64 }} | |
MAVEN_SECRING_PASSWORD: ${{ secrets.MAVEN_SECRING_PASSWORD }} | |
run: | | |
chmod +x ./scripts/publish_sdk.sh | |
./scripts/publish_sdk.sh | |
shell: bash | |
- name: Send success notification | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_CHANNEL: criteo-api-sdk-generator | |
SLACK_COLOR: ${{ job.status }} | |
SLACK_MESSAGE: Java sdk publish succeeded. <https://github.com/criteo/criteo-api-java-sdk/actions/runs/${{github.run_id}}|Link to build> | |
SLACK_USERNAME: sdk-generation-bot | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
SLACK_FOOTER: '' | |
SLACK_ICON_EMOJI: green_check_mark | |
- name: Send failure notification | |
if: ${{ failure() }} | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_CHANNEL: criteo-api-sdk-generator | |
SLACK_COLOR: ${{ job.status }} | |
SLACK_MESSAGE: Java sdk publish failed. <https://github.com/criteo/criteo-api-java-sdk/actions/runs/${{github.run_id}}|Link to build> | |
SLACK_USERNAME: sdk-generation-bot | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
SLACK_FOOTER: '' | |
SLACK_ICON_EMOJI: x |