Merge pull request #262 from aliceinwire/release #65
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Create Debian Package | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-deb: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install build dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential \ | |
| debhelper \ | |
| devscripts \ | |
| dh-python \ | |
| dh-sequence-python3 \ | |
| pybuild-plugin-pyproject \ | |
| fakeroot \ | |
| python3-all \ | |
| python3-poetry-core | |
| - name: Create upstream tarball | |
| run: | | |
| DEB_VERSION=$(dpkg-parsechangelog -SVersion) | |
| UPSTREAM_VERSION=${DEB_VERSION%%-*} | |
| git archive --format=tar.gz \ | |
| --output=../kci-dev_${UPSTREAM_VERSION}.orig.tar.gz \ | |
| --prefix=kci-dev-${UPSTREAM_VERSION}/ \ | |
| HEAD | |
| - name: Build Debian package | |
| run: debuild -b -us -uc --lintian-opts --profile debian | |
| - name: Collect Debian artifacts | |
| run: | | |
| mkdir -p artifacts | |
| shopt -s nullglob | |
| for file in ../kci-dev_*; do | |
| mv "$file" artifacts/ | |
| done | |
| - name: Upload Debian artifact to the workflow | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: kci-dev-debian-package | |
| path: artifacts/ | |
| - name: Upload Debian package to GitHub Release on new tag | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: softprops/action-gh-release@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| files: artifacts/* |