Skip to content

Commit

Permalink
CDS-2566 - Implement chart annotation api. (#131)
Browse files Browse the repository at this point in the history
* CDS-2566 - Implement chart annotation api.

* Update label
  • Loading branch information
Nikunjp1904 authored Dec 12, 2024
1 parent b26b49f commit 35f2638
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ permissions:
id-token: write
contents: read
issues: write
pull-requests: write
pull-requests: write
jobs:
release:
if: startsWith(github.ref, 'refs/tags/')
Expand All @@ -17,7 +17,7 @@ jobs:
uses: actions/checkout@master
with:
fetch-depth: 0

- name: Build Changelog
id: generatechangelog
uses: mikepenz/[email protected]
Expand All @@ -26,7 +26,7 @@ jobs:
ignorePreReleases: "true"
env:
GITHUB_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}

- name: Make release
id: release
uses: softprops/action-gh-release@master
Expand All @@ -36,3 +36,22 @@ jobs:
body: ${{ steps.generatechangelog.outputs.changelog }}
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_WRITE }}

- name: Add Chart Annotation
env:
AMPLITUDE_API_KEY: ${{ secrets.AMPLITUDE_API_KEY }}
AMPLITUDE_SECRET_KEY: ${{ secrets.AMPLITUDE_SECRET_KEY }}
GITHUB_REF_NAME: ${{ github.ref_name }}
run: |
ENCODED_CREDENTIALS=$(echo -n "${AMPLITUDE_API_KEY}:${AMPLITUDE_SECRET_KEY}" | base64 | tr -d '\n')
curl --http1.1 -X POST "https://amplitude.com/api/2/annotations" \
-H "Authorization: Basic $ENCODED_CREDENTIALS" \
-H "Content-Type: application/json" \
-d '{
"app_id": 617088,
"date": "'$(date +%Y-%m-%d)'",
"label": "Released RN SDK '"$GITHUB_REF_NAME"'",
"chart_id": null,
"details": null
}'

0 comments on commit 35f2638

Please sign in to comment.