Skip to content

Commit

Permalink
Add job to create a GitHub release
Browse files Browse the repository at this point in the history
  • Loading branch information
dlarocque committed May 15, 2024
1 parent 2ce9569 commit b75cb32
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/release-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,28 @@ jobs:
curl -X POST -H "Content-Type:application/json" \
-d "{\"version\":\"$BASE_VERSION\",\"date\":\"$DATE\"}" \
$RELEASE_TRACKER_URL/logProduction
- name: Create Github release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Get the newest release tag for the firebase package (e.g. [email protected])
NEWEST_TAG=$(git describe --tags --match "firebase@[0-9]*.[0-9]*.[0-9]*" --abbrev=0)
# Get the release notes from the description of the most recent merged PR into the "release" branch
# See: https://github.com/firebase/firebase-js-sdk/pull/8236 for an example description
RELEASE_NOTES=$(gh pr list \
--repo "$GITHUB_REPOSITORY" \
--state "merged" \
--base "release" \
--limit 1 \
--json "body" \
| jq '.[].body'\
| jq -r . \
| sed '1,/^# Releases/d')
# Create the GitHub release
gh release create "$NEWEST_TAG" \
--repo="$GITHUB_REPOSITORY" \
--title="$NEWEST_TAG" \
--notes "$RELEASE_NOTES" \
--verify-tag

0 comments on commit b75cb32

Please sign in to comment.