Skip to content

Commit

Permalink
Make debian package generation dispatch only
Browse files Browse the repository at this point in the history
  • Loading branch information
Rot127 committed Nov 10, 2024
1 parent 7827f86 commit 70b3f94
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 23 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/build_deb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build Debian Package

on: workflow_dispatch

jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Build Debian Package
working-directory: ./packages/deb
run: ./setup.sh "$(git describe --tags --abbrev=0)"

- name: Run sanity checks on the Debian package
working-directory: ./packages/deb
run: |
./check_capstone.sh ./libcapstone-dev.deb "$(git describe --tags --abbrev=0)"
- uses: actions/upload-artifact@v4
with:
path: ./packages/deb/libcapstone-dev.deb
23 changes: 0 additions & 23 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,6 @@ jobs:
with:
submodules: true

- name: Build Debian Package
working-directory: ./packages/deb
run: ./setup.sh ${{ github.event.release.tag_name }}

- name: Run sanity checks on the Debian package
working-directory: ./packages/deb
run: |
./check_capstone.sh ./libcapstone-dev.deb ${{ github.event.release.tag_name }}
- name: Rename Debian package
working-directory: ./packages/deb
run: |
dpkg-name libcapstone-dev.deb
- name: Upload debian package to release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.release.tag_name }}
files: |
./packages/deb/*.deb
- name: Create archive
id: archive
run: |
Expand Down
7 changes: 7 additions & 0 deletions packages/deb/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Incomplete Debian package implementation.
It can be used to generate an easily installable Capstone, but misses a lot of
mandatory things to add it in the Debian repos (`debian/control` is incomplete, no dependencies added etc.).

You can build the package by dispatching the `Build Debian Package` workflow or executing the commands in the `Dockerfile`.
It assumes the current commit is tagged and `"$(git describe --tags --abbrev=0)"` returns a valid version number.
The package is uploaded as artifact.

0 comments on commit 70b3f94

Please sign in to comment.