From 70b3f9480e7c3891cd02ddb54d18df0b7ace6d93 Mon Sep 17 00:00:00 2001 From: Rot127 Date: Sun, 10 Nov 2024 11:20:10 -0500 Subject: [PATCH] Make debian package generation dispatch only --- .github/workflows/build_deb.yml | 25 +++++++++++++++++++++++++ .github/workflows/build_release.yml | 23 ----------------------- packages/deb/README.md | 7 +++++++ 3 files changed, 32 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/build_deb.yml create mode 100644 packages/deb/README.md diff --git a/.github/workflows/build_deb.yml b/.github/workflows/build_deb.yml new file mode 100644 index 0000000000..cf7cf080d9 --- /dev/null +++ b/.github/workflows/build_deb.yml @@ -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 diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 2eb0737947..d818270ca8 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -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: | diff --git a/packages/deb/README.md b/packages/deb/README.md new file mode 100644 index 0000000000..fc79aa4e0e --- /dev/null +++ b/packages/deb/README.md @@ -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.