diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 18b8aaff07..a1494ac40c 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -1081,13 +1081,27 @@ jobs: # Retry script for 5XX server errors: https://github.com/actions/github-script#retries retries: 5 script: | - github.rest.git.createRef({ + await github.rest.git.createRef({ owner: context.repo.owner, repo: context.repo.repo, ref: "refs/tags/${{ needs.tag.outputs.build-tag }}", sha: context.sha, }) + - name: Create GitHub release + if: github.ref_name == 'release' + uses: actions/github-script@v6 + with: + # Retry script for 5XX server errors: https://github.com/actions/github-script#retries + retries: 5 + script: | + await github.rest.repos.createRelease({ + owner: context.repo.owner, + repo: context.repo.repo, + tag_name: "${{ needs.tag.outputs.build-tag }}", + generate_release_notes: true, + }) + promote-compatibility-data: needs: [ check-permissions, promote-images, tag, regress-tests ] if: github.ref_name == 'release'