Skip to content

[dep] Bump datadog-ci to 2.48.0 #143

[dep] Bump datadog-ci to 2.48.0

[dep] Bump datadog-ci to 2.48.0 #143

# This workflow automatically creates a GitHub release when a release PR is merged.
name: On Release PR merged
on:
pull_request:
types:
- closed
jobs:
release-version-on-merge:
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.title, '[release:')
runs-on: ubuntu-latest
steps:
- name: Get GitHub App token
id: get-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.RELEASE_AUTOMATION_GITHUB_APP_ID }}
private-key: ${{ secrets.RELEASE_AUTOMATION_GITHUB_APP_PRIVATE_KEY }}
- name: Create GitHub release
uses: actions/github-script@v7
with:
github-token: ${{ steps.get-token.outputs.token }}
script: |
const tagName = '${{ github.event.pull_request.head.ref }}'.replace('release/', '')
github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: tagName,
name: tagName,
body: ${{ toJSON(github.event.pull_request.body) }}
});