Skip to content

Update AWS v2 API docs #294

Update AWS v2 API docs

Update AWS v2 API docs #294

Workflow file for this run

name: Release
permissions:
contents: write
pull-requests: write
on:
pull_request:
types: [closed]
branches:
- master
jobs:
create_release:
name: Create release
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/')
steps:
- name: Get GitHub App token
id: get_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.PIPELINE_GITHUB_APP_ID }}
private-key: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }}
- name: Create release
uses: actions/github-script@v6
env:
RELEASE_BRANCH: ${{ github.head_ref }}
with:
github-token: ${{ steps.get_token.outputs.token }}
script: |
const tagName = process.env.RELEASE_BRANCH.split("/")[1];
await github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/tags/${tagName}`,
sha: context.payload.pull_request.merge_commit_sha,
});
await github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
generate_release_notes: true,
tag_name: tagName,
});