Bump version to 4.0.26 #62
Workflow file for this run
This file contains 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: Packaging for Debian and Ubuntu | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: ${{ matrix.target }} | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: | |
- amd64 | |
target: | |
- "debian:bookworm" | |
- "debian:buster" | |
- "debian:bullseye" | |
- "ubuntu:noble" | |
- "ubuntu:focal" | |
- "ubuntu:jammy" | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Install prereq packages | |
run: ./debpkg-setup.sh | |
- name: Build packages | |
run: ./debpkg-build.sh | |
- name: Set environment variables for upload | |
run: echo DIRNAME=${{ matrix.target }} | tr ':' '_' >> $GITHUB_ENV | |
- name: Copy packages to uploadable location | |
run: | | |
mkdir -p packages/${DIRNAME} | |
cp ../*.deb packages/${DIRNAME}/ | |
- name: Store packages | |
uses: actions/upload-artifact@v4 | |
with: | |
name: packages-${{ env.DIRNAME }} | |
path: packages/${{ env.DIRNAME }}/*.deb | |
retention-days: 1 | |
test: | |
runs-on: ubuntu-latest | |
container: | |
image: ${{ matrix.target }} | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: | |
- amd64 | |
target: | |
- "debian:buster" | |
- "debian:bullseye" | |
- "ubuntu:focal" | |
- "ubuntu:jammy" | |
- "ubuntu:noble" | |
- "debian:bookworm" | |
needs: build | |
steps: | |
- name: Set environment variables for download | |
run: echo DIRNAME=${{ matrix.target }} | tr ':' '_' >> $GITHUB_ENV | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: packages-${{ env.DIRNAME }} | |
- name: Add repositories | |
run: | | |
apt update -y | |
apt install -y apt-transport-https curl | |
curl -1sLf 'https://dl.cloudsmith.io/public/wand/libwandio/cfg/setup/bash.deb.sh' | bash | |
curl -1sLf 'https://dl.cloudsmith.io/public/wand/libwandder/cfg/setup/bash.deb.sh' | bash | |
- name: Test package install | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
run: | | |
apt update -y | |
find . -name "*.deb" | xargs apt install -y | |
- name: Test package removal | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
run: | | |
apt remove -y --purge libtrace4 | |
publish: | |
runs-on: ubuntu-latest | |
container: | |
image: ${{ matrix.target }} | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: | |
- amd64 | |
target: | |
- "debian:buster" | |
- "debian:bullseye" | |
- "debian:bookworm" | |
- "ubuntu:focal" | |
- "ubuntu:jammy" | |
- "ubuntu:noble" | |
needs: test | |
steps: | |
- name: Set environment variables for download | |
run: echo DIRNAME=${{ matrix.target }} | tr ':' '_' >> $GITHUB_ENV | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: packages-${{ env.DIRNAME }} | |
- name: Copy packages | |
run: | | |
mkdir -p packages/${DIRNAME} | |
find . -name "*.deb" | xargs cp -t packages/${DIRNAME}/ | |
- name: Publish package to cloudsmith | |
uses: salcock/[email protected] | |
with: | |
path: packages/ | |
repo: ${{ secrets.CLOUDSMITH_OWNER }}/libtrace | |
username: salcock | |
api_key: ${{ secrets.CLOUDSMITH_API_KEY }} |