Skip to content

Commit

Permalink
Workflow dispatch support for deb build CI
Browse files Browse the repository at this point in the history
  • Loading branch information
COM8 committed Sep 22, 2024
1 parent a559644 commit 0e2fcb7
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/build-deb.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
name: Build Debian Package
on:
push:
tags:
- 1.**
tags: [ '[0-9]+.[0-9]+.[0-9]+' ]
workflow_dispatch:
inputs:
version:
description: 'The optional semantic version number. If not supplied the branch/tag will be used.'
type: string
pull_request:

jobs:
Expand All @@ -23,10 +27,18 @@ jobs:
- name: "Install building tools"
run: sudo apt install -y cmake debmake devscripts debhelper

- name: Set version based on input
if: ${{ inputs.version }}
run: echo "RELEASE_VERSION=${{ inputs.version }}" >> "$GITHUB_ENV"
- name: Set version based on ref
if: ${{ !inputs.version }}
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> "$GITHUB_ENV"
- name: Print Version
run: echo "deb version will be '${{ env.RELEASE_VERSION }}'"
# Build package of runtime library
- name: "Package build of runtime library"
env:
VERSION: ${{ github.ref_name }}
VERSION: ${{ env.RELEASE_VERSION }}
run: bash cpr/package-build/build-package.sh cpr

- name: "Upload deb-packages"
Expand Down

0 comments on commit 0e2fcb7

Please sign in to comment.