Skip to content

Commit aaa57ef

Browse files
committed
Always build packages and upload their artifacts.
1 parent 78210ba commit aaa57ef

File tree

1 file changed

+47
-5
lines changed

1 file changed

+47
-5
lines changed

.github/workflows/build_release.yml

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,28 @@
1-
name: Build Source Release
1+
name: Source Build
22

3-
# Trigger whenever a release is created
43
on:
4+
push:
5+
paths-ignore:
6+
- ".gitignore"
7+
- "docs/**"
8+
- "ChangeLog"
9+
- "CREDITS.TXT"
10+
- "COMPILE_MAKE.TXT"
11+
- "BUILDING.md"
12+
- "CONTRIBUTING.md"
13+
- "LICENSE.TXT"
14+
- "LICENSE_LLVM.TXT"
15+
- "README.md"
16+
- "RELEASE_NOTES"
17+
- "SPONSORS.TXT"
18+
- "TODO"
19+
pull_request:
520
release:
6-
types:
7-
- created
21+
types: [published]
822

923
jobs:
1024
build:
11-
name: build
25+
name: Build packages and upload
1226
runs-on: ubuntu-latest
1327
steps:
1428
- uses: actions/checkout@v4
@@ -29,8 +43,19 @@ jobs:
2943
echo "tarball=$TARBALL" >> $GITHUB_OUTPUT
3044
echo "shasum=$SHASUM" >> $GITHUB_OUTPUT
3145
46+
- uses: actions/upload-artifact@v4
47+
with:
48+
name: ${{ steps.archive.outputs.tarball }}
49+
path: ${{ steps.archive.outputs.tarball }}
50+
51+
- uses: actions/upload-artifact@v4
52+
with:
53+
name: ${{ steps.archive.outputs.shasum }}
54+
path: ${{ steps.archive.outputs.shasum }}
55+
3256
- name: Upload tarball and shasum to release
3357
uses: softprops/action-gh-release@v2
58+
if: startsWith(github.ref, 'refs/tags') && github.event_name == 'release'
3459
env:
3560
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3661
with:
@@ -54,8 +79,19 @@ jobs:
5479
cpack -G DEB
5580
cpack -G RPM
5681
82+
- uses: actions/upload-artifact@v4
83+
with:
84+
name: capstone_x86.deb
85+
path: ./build/*.deb
86+
87+
- uses: actions/upload-artifact@v4
88+
with:
89+
name: capstone_x86.rpm
90+
path: ./build/*.rpm
91+
5792
- name: Upload debian package to release
5893
uses: softprops/action-gh-release@v2
94+
if: startsWith(github.ref, 'refs/tags') && github.event_name == 'release'
5995
env:
6096
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6197
with:
@@ -99,8 +135,14 @@ jobs:
99135
cd build
100136
cpack -G NSIS
101137
138+
- uses: actions/upload-artifact@v4
139+
with:
140+
name: capstone_x64.exe
141+
path: ./build/*.exe
142+
102143
- name: Upload NSIS installer to release
103144
uses: softprops/action-gh-release@v2
145+
if: startsWith(github.ref, 'refs/tags') && github.event_name == 'release'
104146
env:
105147
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
106148
with:

0 commit comments

Comments
 (0)