change: also fetch tags #17
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: Build DEB Package | |
| on: | |
| push: | |
| branches: | |
| - feat/tag-build | |
| pull_request: | |
| branches: | |
| - feat/tag-build | |
| jobs: | |
| build-deb: | |
| runs-on: ubuntu-latest | |
| env: | |
| DEB_BUILD_OPTIONS: nocheck # or whatever options you need | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install build dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential devscripts debhelper autotools-dev fakeroot sed | |
| - name: Fetch all branches | |
| run: git fetch --tags | |
| - name: update branch name | |
| run: | | |
| safe_branch=$(echo "${GITHUB_REF_NAME}" | tr '/' '-') | |
| sed "s|BRANCH_VERSION|$safe_branch|" configure.ac.in > configure.ac | |
| env: | |
| GITHUB_REF_NAME: ${{ github.ref_name }} | |
| - name: update debian changelog | |
| run: bash ./git2debchangelog.sh > debian/changelog | |
| - name: Prepare autotools | |
| run: | | |
| # Nur falls nicht schon vorhanden (optional) | |
| autoreconf -fi | |
| - name: Build .deb package | |
| run: | | |
| # baue mit dpkg-buildpackage (ohne signieren) | |
| dpkg-buildpackage -us -uc -d | |
| - name: Collect .deb artifact | |
| run: | | |
| mkdir -p artifacts | |
| mv ../*.deb artifacts/ | |
| - name: Upload .deb package | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: libosal-deb | |
| path: artifacts/*.deb | |
| - name: Install Cloudsmith CLI | |
| run: pip install --upgrade cloudsmith-cli | |
| - name: Upload .deb to Cloudsmith | |
| run: cloudsmith push deb --republish robert-burger-AdLL/libosal/ubuntu/noble artifacts/libosal_0.0.6_amd64.deb --api-key ${{ secrets.CLOUDSMITH_API_KEY }} |