File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,7 +2,9 @@ name: Publish to RedGuides
22
33on :
44 push :
5- branches : [ "main" ]
5+ tags :
6+ - ' v*'
7+ - ' [0-9]*'
68
79jobs :
810 publish :
@@ -11,11 +13,19 @@ jobs:
1113 - name : Checkout code
1214 uses : actions/checkout@v4
1315 with :
14- ref : " ${{ github.ref }}"
16+ ref : " ${{ github.ref }}"
17+ fetch-depth : 0
1518
1619 - name : Build zip file
1720 run : git archive --format=zip --prefix="${{ github.event.repository.name }}/" -o "${{ github.event.repository.name }}.zip" HEAD
1821
22+ - name : Create message from git log
23+ env :
24+ VERSION : " ${{ github.ref_name }}"
25+ run : |
26+ PREV=$(git describe --tags --abbrev=0 "${VERSION}^" 2>/dev/null || echo "")
27+ git log --no-merges --pretty=format:"- [%s](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/commit/%H)%n%n%b%n%n~ %an" ${PREV:+$PREV..}${VERSION} > rg_
28+
1929 - name : Publish to RedGuides
2030 uses : RedGuides/redguides-publish@v1
2131 env :
2434 resource_id : " 3012"
2535 version : " ${{ github.ref_name }}"
2636 file : " ${{ github.event.repository.name }}.zip"
37+ message : " rg_release_notes.md"
2738 domain : " https://raw.githubusercontent.com/${{ github.repository }}"
You can’t perform that action at this time.
0 commit comments