Skip to content

Commit

Permalink
Add step for testing install of binary package
Browse files Browse the repository at this point in the history
  • Loading branch information
alex1701c committed Nov 3, 2024
1 parent e4bdaca commit 0c17b02
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,22 @@ jobs:
cpack | tee cpack.out
filepath=$(sed -nr 's/.*package: (.+) generated\./\1/p' cpack.out)
echo "filepath=$filepath" >> "$GITHUB_OUTPUT"
- name: Test install of binary packages
shell: bash
if: inputs.publish-version
run: |
binary_file="${{ steps.cpack.outputs.filepath }}"
# Detect and install using the correct package manager
if [[ "${{ matrix.os.name }}" == "ubuntu" ]]; then
apt install -y "$binary_file"
elif [[ "${{ matrix.os.name }}" == "fedora" ]]; then
dnf install -y "$binary_file"
elif [[ "${{ matrix.os.name }}" == "opensuse" ]]; then
zypper install -y "$binary_file"
else
echo "Unsupported OS"
exit 1
fi
- uses: actions/upload-artifact@v4
if: inputs.publish-version
Expand Down

0 comments on commit 0c17b02

Please sign in to comment.