-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (29 loc) · 887 Bytes
/
pre-release.yml
File metadata and controls
30 lines (29 loc) · 887 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: Pre Release
on:
pull_request:
paths: [CHANGELOG.md]
branches: [master]
jobs:
Post-Comment:
name: Post Comment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
source .github/scripts/changelog.sh
git fetch origin --tags
if [[ ! -z "$version" && -z "$(git tag -l "v$version")" ]]; then
echo "BODY<<EOF" >> $GITHUB_ENV
echo "$(IFS=$'\n'; echo "${log[*]}")" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
echo "TAG=v$version" >> $GITHUB_ENV
fi
shell: bash
- if: ${{ env.TAG != '' }}
uses: marocchino/sticky-pull-request-comment@efaaab3fd41a9c3de579aba759d2552635e590fd # v2.8.0
with:
header: pre-release
recreate: true
message: |
## ${{ env.TAG }}
${{ env.BODY }}