Skip to content

Commit

Permalink
Create GitHub release from release tag (#5246)
Browse files Browse the repository at this point in the history
## Problem

This PR creates a GitHub release from a release tag with an
autogenerated changelog: https://github.com/neondatabase/neon/releases

## Summary of changes
- Call GitHub API to create a release
bayandin authored Sep 9, 2023
1 parent f64b338 commit 1ea93af
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -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'

1 comment on commit 1ea93af

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1712 tests run: 1632 passed, 0 failed, 80 skipped (full report)


Code coverage (full report)

  • functions: 53.1% (7600 of 14308 functions)
  • lines: 81.4% (44708 of 54909 lines)

The comment gets automatically updated with the latest test results
1ea93af at 2023-09-09T21:50:23.982Z :recycle:

Please sign in to comment.