From 0e2fcb7569c4728f56e7c445e5a7a07bb42fcde1 Mon Sep 17 00:00:00 2001 From: Fabian Sauter Date: Sun, 22 Sep 2024 09:23:39 +0200 Subject: [PATCH] Workflow dispatch support for deb build CI --- .github/workflows/build-deb.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-deb.yml b/.github/workflows/build-deb.yml index cff419b5b..56794b2a6 100644 --- a/.github/workflows/build-deb.yml +++ b/.github/workflows/build-deb.yml @@ -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: @@ -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"