jtdor / build-deb-action

GitHub action for building Debian packages with dpkg-buildpackage.
MIT License
25 stars 11 forks source link

Documentation improvement: suggestion #6

Open colisee opened 1 year ago

colisee commented 1 year ago

Hi,

the documentation does not mention how to generate source and binary (which is the default behavior for dpkg-buildpackage)

This is the github action code I used in that respect:

jobs:
  build-debs:
    runs-on: ubuntu-latest
    steps:
      -
        name: checkout
        uses: actions/checkout@v3
        with:
          fetch-depth: '0'
      -
        name: build-deb-amd64
        uses: jtdor/build-deb-action@v1
        env:
          DEB_BUILD_OPTIONS: noautodbgsym
        with:
          buildpackage-opts: --build=full
          extra-build-deps: pristine-tar git
          before-build-hook: pristine-tar checkout ../$(pristine-tar list)
          host-arch: amd64
      -
        name: upload
        uses: actions/upload-artifact@v3
        with:
          path: debian/artifacts/
          name: debian_package

Note:

Feel free to add the above to your documentation, if you feel it could be of use.

Cheers.

jtdor commented 1 year ago

Hi @colisee,

thank you for the suggestion!

Originally I wanted to keep the documentation short here and mainly refer to the documentations of dpkg-buildpackage and the other involved tools. But I see that it would be helpful to show more than just the most trivial use case in the action’s readme, as it’s currently done.

Will think about how to present your use case (thanks for the code) and maybe others. Will keep this issue open for now as a reminder to myself.

In case you find any problems with other use cases, please let me know!

colisee commented 1 year ago

Hi @jtdor,

This is the least I could do!

For your information, you can find the full github action (which uses a matrix strategy) here

Please note that I modified the before-build-hook argument in my action because I had several tars listed by the command pristine tar checkout. As a reminder, the pristine command works if your git repository contains a pristine-tar branch (in my case generated through git-buildpackage)

Cheers.