Skip to content

Commit f43b2b4

Browse files
authored
Fix API call, add commit message (#6247)
1 parent e5a4654 commit f43b2b4

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

.github/workflows/merge-release-branch.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,28 @@ jobs:
99
permissions:
1010
contents: write
1111
steps:
12+
- name: Checkout Release Branch
13+
uses: actions/checkout@master
14+
with:
15+
ref: release
16+
- name: Get release version
17+
id: get-version
18+
run: |
19+
export VERSION_SCRIPT="const pkg = require('./packages/firebase/package.json'); console.log(pkg.version);"
20+
export VERSION=`node -e "${VERSION_SCRIPT}"`
21+
echo "::set-output name=RELEASE_VERSION::$VERSION"
22+
- name: Echo version in shell
23+
run: |
24+
echo "Merging release ${{ steps.get-version.outputs.RELEASE_VERSION }}"
1225
- name: Merge to master
1326
uses: actions/github-script@v6
1427
with:
1528
github-token: ${{ secrets.GITHUB_TOKEN }}
1629
script: |
17-
github.repos.merge({
30+
github.rest.repos.merge({
1831
owner: context.repo.owner,
1932
repo: context.repo.repo,
2033
base: 'master',
21-
head: 'release'
34+
head: 'release',
35+
commit_message: 'Release ${{ steps.get-version.outputs.RELEASE_VERSION }}'
2236
})

0 commit comments

Comments
 (0)