[251014] Automatic update of SDK. #221
This file contains hidden or 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@v5 | |
- name: Publish SDKs | |
env: | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
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 | |
if: ${{ success() }} | |
uses: slackapi/[email protected] | |
with: | |
webhook: ${{ secrets.SLACK_WEBHOOK }} | |
webhook-type: incoming-webhook | |
payload: | | |
status: "${{ job.status }}" | |
channel: "C02J0CWR789" | |
username: "sdk-generation-bot" | |
color: "#80FF00" | |
text: "Java SDK publishing succeeded. <https://github.com/criteo/criteo-api-java-sdk/actions/runs/${{github.run_id}}|Link to build>." | |
icon_emoji: ":green_check_mark:" | |
- name: Send failure notification | |
if: ${{ failure() }} | |
uses: slackapi/[email protected] | |
with: | |
webhook: ${{ secrets.SLACK_WEBHOOK }} | |
webhook-type: incoming-webhook | |
payload: | | |
status: "${{ job.status }}" | |
channel: "C02J0CWR789" | |
username: "sdk-generation-bot" | |
color: "#FF0000" | |
text: "Java SDK publishing failed. <https://github.com/criteo/criteo-api-java-sdk/actions/runs/${{github.run_id}}|Link to build>." | |
icon_emoji: ":x:" | |