Skip to content

Commit 7783374

Browse files
committed
github-action: fix branch name in release stage
1 parent 2375682 commit 7783374

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ jobs:
2121
echo Computing next tag number
2222
LASTPATCH=$(git describe --tags | cut -d- -f1 | cut -d. -f3)
2323
PATCH=$(($LASTPATCH+1))
24-
echo "::set-output name=tagname::2.1.${PATCH}"
24+
echo "::set-output name=tagname::2.1.${PATCH}
25+
echo "::set-output name=branch::${GITHUB_REF#refs/heads/}"
26+
2527
- name: Set up Ruby
2628
uses: ruby/setup-ruby@v1
2729
with:
@@ -36,5 +38,5 @@ jobs:
3638
with:
3739
token: ${{ secrets.GITHUB_TOKEN }}
3840
tag: ${{ steps.compute-tag.outputs.tagname }}
39-
commit: main
41+
commit: ${{ steps.compute-tag.outputs.branch }}
4042
artifacts: './progit.epub,./progit.mobi,./progit.pdf,./progit.html'

0 commit comments

Comments
 (0)