Skip to content

Commit 320a6a3

Browse files
committed
.github/workflow: Add auto release publish workflow
Signed-off-by: Shi Jin <[email protected]>
1 parent 951e40d commit 320a6a3

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed

.github/workflows/auto-release.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Auto Release
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
7+
permissions:
8+
contents: write
9+
packages: read
10+
11+
jobs:
12+
release:
13+
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release')
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Extract version
22+
id: version
23+
run: |
24+
VERSION=$(grep 'AC_INIT' configure.ac | sed 's/.*\[\([^]]*\)\].*/\1/' | head -1)
25+
echo "version=$VERSION" >> $GITHUB_OUTPUT
26+
27+
- name: Build libfabric
28+
run: |
29+
./autogen.sh
30+
./configure --prefix=$PWD/install
31+
make
32+
make install
33+
make dist
34+
35+
- name: Build fabtests
36+
run: |
37+
cd fabtests
38+
./autogen.sh
39+
./configure --with-libfabric=$PWD/../install
40+
make dist
41+
42+
- name: Generate checksums
43+
id: checksums
44+
run: |
45+
echo "sha512_sums<<EOF" >> $GITHUB_OUTPUT
46+
sha512sum libfabric-*.tar.* fabtests/fabtests-*.tar.* >> $GITHUB_OUTPUT
47+
echo "EOF" >> $GITHUB_OUTPUT
48+
echo "md5_sums<<EOF" >> $GITHUB_OUTPUT
49+
md5sum libfabric-*.tar.* fabtests/fabtests-*.tar.* >> $GITHUB_OUTPUT
50+
echo "EOF" >> $GITHUB_OUTPUT
51+
52+
- name: Create Release
53+
uses: softprops/action-gh-release@v1
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
with:
57+
tag_name: ${{ steps.version.outputs.version }}
58+
name: Libfabric ${{ steps.version.outputs.version }}
59+
draft: true
60+
body: |
61+
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](https://github.com/${{ github.repository }}/blob/${{ steps.version.outputs.version }}/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](https://github.com/${{ github.repository }}/blob/${{ steps.version.outputs.version }}/README.md) file in the source tree or at the project's homepage.
62+
63+
Download the distribution tarballs below to get started:
64+
65+
**sha512 sums**
66+
```
67+
${{ steps.checksums.outputs.sha512_sums }}
68+
```
69+
70+
**md5sums**
71+
```
72+
${{ steps.checksums.outputs.md5_sums }}
73+
```
74+
75+
${{ github.event.pull_request.body }}
76+
files: |
77+
libfabric-*.tar.gz
78+
libfabric-*.tar.bz2
79+
fabtests/fabtests-*.tar.gz
80+
fabtests/fabtests-*.tar.bz2

0 commit comments

Comments
 (0)