Skip to content

Commit 56c6f25

Browse files
committed
.github/workflow: Add auto release publish workflow
Signed-off-by: Shi Jin <[email protected]>
1 parent e84d083 commit 56c6f25

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

.github/workflows/auto-release.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Auto Release
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
7+
jobs:
8+
release:
9+
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release')
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Extract version
18+
id: version
19+
run: |
20+
VERSION=$(grep 'AC_INIT' configure.ac | sed 's/.*\[\([^]]*\)\].*/\1/' | head -1)
21+
echo "version=$VERSION" >> $GITHUB_OUTPUT
22+
23+
- name: Build libfabric
24+
run: |
25+
./autogen.sh
26+
./configure
27+
make dist
28+
29+
- name: Generate checksums
30+
id: checksums
31+
run: |
32+
echo "sha256_sums<<EOF" >> $GITHUB_OUTPUT
33+
sha256sum libfabric-*.tar.* >> $GITHUB_OUTPUT
34+
echo "EOF" >> $GITHUB_OUTPUT
35+
echo "md5_sums<<EOF" >> $GITHUB_OUTPUT
36+
md5sum libfabric-*.tar.* >> $GITHUB_OUTPUT
37+
echo "EOF" >> $GITHUB_OUTPUT
38+
39+
- name: Create Release
40+
uses: softprops/action-gh-release@v1
41+
with:
42+
tag_name: ${{ steps.version.outputs.version }}
43+
name: Libfabric ${{ steps.version.outputs.version }}
44+
draft: true
45+
body: |
46+
The OpenFabrics Interfaces Working Group (OFIWG) and the libfabric open-source community are pleased to announce the release of version ${{ steps.version.outputs.version }} of libfabric. See NEWS.md for the list of features and enhancements that have been added since the last release. Installation instructions are available in the README.md file in the source tree or at the project's homepage.
47+
48+
Download the distribution tarballs below to get started:
49+
50+
**sha256 sums**
51+
```
52+
${{ steps.checksums.outputs.sha256_sums }}
53+
```
54+
55+
**md5sums**
56+
```
57+
${{ steps.checksums.outputs.md5_sums }}
58+
```
59+
60+
${{ github.event.pull_request.body }}
61+
files: |
62+
libfabric-*.tar.gz
63+
libfabric-*.tar.bz2

0 commit comments

Comments
 (0)