Skip to content

Commit 1d571c7

Browse files
committed
.github: migrate to ncipollo/release-action
Signed-off-by: Joachim Wiberg <[email protected]>
1 parent 988b91c commit 1d571c7

File tree

1 file changed

+9
-33
lines changed

1 file changed

+9
-33
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,7 @@ on:
77

88
jobs:
99
release:
10-
name: Create GitHub release
11-
runs-on: ubuntu-latest
12-
if: startsWith(github.ref, 'refs/tags/')
13-
outputs:
14-
upload_url: ${{ steps.create_release.outputs.upload_url }}
15-
release_id: ${{ steps.create_release.outputs.id }}
16-
steps:
17-
- uses: actions/checkout@v4
18-
- name: Extract ChangeLog entry ...
19-
# Hack to extract latest entry for body_path below
20-
run: |
21-
awk '/-----*/{if (x == 1) exit; x=1;next}x' ChangeLog.md \
22-
|head -n -1 > release.md
23-
cat release.md
24-
- name: Create release ...
25-
id: create_release
26-
uses: actions/create-release@v1
27-
env:
28-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29-
with:
30-
tag_name: ${{ github.ref }}
31-
release_name: mcjoin ${{ github.ref }}
32-
body_path: release.md
33-
draft: false
34-
prerelease: false
35-
tarball:
3610
name: Build and upload release tarball
37-
needs: release
3811
if: startsWith(github.ref, 'refs/tags/')
3912
runs-on: ubuntu-latest
4013
steps:
@@ -49,10 +22,13 @@ jobs:
4922
ls -lF ../
5023
mkdir -p artifacts/
5124
mv ../*.tar.* artifacts/
52-
- name: Upload release artifacts ...
53-
54-
env:
55-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
- name: Extract ChangeLog entry ...
26+
run: |
27+
awk '/-----*/{if (x == 1) exit; x=1;next}x' ChangeLog.md \
28+
|head -n -1 > release.md
29+
cat release.md
30+
- uses: ncipollo/release-action@v1
5631
with:
57-
releaseId: ${{ needs.release.outputs.release_id }}
58-
args: artifacts/*
32+
name: mcjoin ${{ github.ref_name }}
33+
bodyFile: "release.md"
34+
artifacts: "artifacts/*"

0 commit comments

Comments
 (0)