Skip to content

Commit b6d4106

Browse files
Merge pull request #2373 from DataDog/maxep/RUM-10225/release-octo-sts
RUM-10225 Use dd-octo-sts to publish release Co-authored-by: maxep <maxime.epain@datadoghq.com>
2 parents cb8f144 + d21126d commit b6d4106

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

.gitlab-ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,8 @@ Publish GH Asset:
373373
stage: release-publish
374374
rules:
375375
- !reference [.release-pipeline-job, rules]
376+
id_tokens:
377+
<<: *dd-octo-sts-id-token
376378
before_script:
377379
- *export_MAKE_release_params
378380
script:

tools/release/publish-github.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@ parse_args "$@"
2828
GH_ASSET_PATH="$artifacts_path/Datadog.xcframework.zip"
2929
REPO_NAME="DataDog/dd-sdk-ios"
3030

31-
authenticate() {
32-
echo_subtitle "Authenticate 'gh' CLI"
33-
echo_info "Exporting 'GITHUB_TOKEN' for CI"
34-
export GITHUB_TOKEN=$(get_secret $DD_IOS_SECRET__GH_CLI_TOKEN)
31+
verify_gh_auth() {
3532
echo_info "▸ gh auth status"
3633
gh auth status
3734
if [[ $? -ne 0 ]]; then
@@ -59,5 +56,7 @@ echo_info "Publishing '$GH_ASSET_PATH' to '$tag' release in '$REPO_NAME'"
5956
echo_info "▸ Using DRY_RUN = $DRY_RUN"
6057
echo_info "▸ Using OVERWRITE_EXISTING = $OVERWRITE_EXISTING"
6158

62-
authenticate
59+
export GITHUB_TOKEN=$(dd-octo-sts --disable-tracing token --scope DataDog/dd-sdk-ios --policy self.release)
60+
verify_gh_auth
6361
upload
62+
dd-octo-sts --disable-tracing revoke

0 commit comments

Comments
 (0)