|
1 | | -name: Build Source Release |
| 1 | +name: Source Build |
2 | 2 |
|
3 | | -# Trigger whenever a release is created |
4 | 3 | 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: |
5 | 20 | release: |
6 | | - types: |
7 | | - - created |
| 21 | + types: [published] |
8 | 22 |
|
9 | 23 | jobs: |
10 | 24 | build: |
11 | | - name: build |
| 25 | + name: Build packages and upload |
12 | 26 | runs-on: ubuntu-latest |
13 | 27 | steps: |
14 | 28 | - uses: actions/checkout@v4 |
|
29 | 43 | echo "tarball=$TARBALL" >> $GITHUB_OUTPUT |
30 | 44 | echo "shasum=$SHASUM" >> $GITHUB_OUTPUT |
31 | 45 |
|
| 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 | + |
32 | 56 | - name: Upload tarball and shasum to release |
33 | 57 | uses: softprops/action-gh-release@v2 |
| 58 | + if: startsWith(github.ref, 'refs/tags') && github.event_name == 'release' |
34 | 59 | env: |
35 | 60 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
36 | 61 | with: |
|
54 | 79 | cpack -G DEB |
55 | 80 | cpack -G RPM |
56 | 81 |
|
| 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 | + |
57 | 92 | - name: Upload debian package to release |
58 | 93 | uses: softprops/action-gh-release@v2 |
| 94 | + if: startsWith(github.ref, 'refs/tags') && github.event_name == 'release' |
59 | 95 | env: |
60 | 96 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
61 | 97 | with: |
@@ -99,8 +135,14 @@ jobs: |
99 | 135 | cd build |
100 | 136 | cpack -G NSIS |
101 | 137 |
|
| 138 | + - uses: actions/upload-artifact@v4 |
| 139 | + with: |
| 140 | + name: capstone_x64.exe |
| 141 | + path: ./build/*.exe |
| 142 | + |
102 | 143 | - name: Upload NSIS installer to release |
103 | 144 | uses: softprops/action-gh-release@v2 |
| 145 | + if: startsWith(github.ref, 'refs/tags') && github.event_name == 'release' |
104 | 146 | env: |
105 | 147 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
106 | 148 | with: |
|
0 commit comments