File tree Expand file tree Collapse file tree
workflows/publish-github-release Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Publish GitHub release
1+ name : Publish GitHub release (legacy path — please switch to `cubing/actions-workflows/workflows/publish-github-release`)
22
33on :
44 workflow_call :
77 Publish :
88 permissions :
99 contents : write
10- runs-on : ubuntu-latest
11- if : startsWith(github.ref, 'refs/tags/v')
12- steps :
13- - name : Calculate release name
14- run : |
15- GITHUB_REF=${{ github.ref }}
16- RELEASE_NAME=${GITHUB_REF#"refs/tags/"}
17- echo "RELEASE_NAME=${RELEASE_NAME}" >> $GITHUB_ENV
18- # We'd use `github.event.head_commit.message`, but that includes the first line of the message. So we check out the code.
19- - name : Check out code for release body calculation using `git` itself
20- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
21- - name : Calculate release body
22- run : git log --format=%b -n 1 HEAD >> /tmp/body-path.txt
23- - name : Publish release
24- uses : softprops/action-gh-release@c9b46fe7aad9f02afd89b12450b780f52dacfb2d
25- env :
26- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
27- with :
28- tag_name : ${{ env.RELEASE_NAME }}
29- body_path : /tmp/body-path.txt
30- draft : false
31- prerelease : false
10+ uses : ${{ github.action_path }}/../workflows/publish-github-release.yaml
Original file line number Diff line number Diff line change 2424 permissions:
2525 contents: write
2626 if: startsWith(github.ref, 'refs/tags/v')
27- uses: cubing/actions-workflows/.github/ workflows/publish-github-release.yaml @main
27+ uses: cubing/actions-workflows/workflows/publish-github-release@main
2828CONTENTS
2929```
3030
Original file line number Diff line number Diff line change 1+ name : Publish GitHub release
2+
3+ on :
4+ workflow_call :
5+
6+ jobs :
7+ Publish :
8+ permissions :
9+ contents : write
10+ runs-on : ubuntu-latest
11+ if : startsWith(github.ref, 'refs/tags/v')
12+ steps :
13+ - name : Calculate release name
14+ run : |
15+ GITHUB_REF=${{ github.ref }}
16+ RELEASE_NAME=${GITHUB_REF#"refs/tags/"}
17+ echo "RELEASE_NAME=${RELEASE_NAME}" >> $GITHUB_ENV
18+ # We'd use `github.event.head_commit.message`, but that includes the first line of the message. So we check out the code.
19+ - name : Check out code for release body calculation using `git` itself
20+ uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
21+ - name : Calculate release body
22+ run : git log --format=%b -n 1 HEAD >> /tmp/body-path.txt
23+ - name : Publish release
24+ uses : softprops/action-gh-release@c9b46fe7aad9f02afd89b12450b780f52dacfb2d
25+ env :
26+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
27+ with :
28+ tag_name : ${{ env.RELEASE_NAME }}
29+ body_path : /tmp/body-path.txt
30+ draft : false
31+ prerelease : false
You can’t perform that action at this time.
0 commit comments