Skip to content

Commit 42cd587

Browse files
committed
Move publish-github-release path.
1 parent cae7017 commit 42cd587

3 files changed

Lines changed: 34 additions & 24 deletions

File tree

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish GitHub release
1+
name: Publish GitHub release (legacy path — please switch to `cubing/actions-workflows/workflows/publish-github-release`)
22

33
on:
44
workflow_call:
@@ -7,25 +7,4 @@ jobs:
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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
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
2828
CONTENTS
2929
```
3030

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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

0 commit comments

Comments
 (0)