From d3230ae8415d31871e3366517dc99362d1364872 Mon Sep 17 00:00:00 2001 From: Trekkie <111065900+TrekkieCoder@users.noreply.github.com> Date: Wed, 13 Nov 2024 11:29:00 +0900 Subject: [PATCH] Update package.yaml --- .github/workflows/package.yaml | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/workflows/package.yaml b/.github/workflows/package.yaml index 2ede3e109..c19b291c4 100644 --- a/.github/workflows/package.yaml +++ b/.github/workflows/package.yaml @@ -32,13 +32,27 @@ jobs: run: | sudo mkdir -p /opt/loxilb/ sudo apt-get purge -y libssl-dev 2>&1 >> /dev/null | true - - name: Build loxilb deb package - run: | - git clone https://github.com/loxilb-io/tools.git build-tools && cd build-tools/pkg/ && make major=${{ github.event.inputs.tagName }} && cd - - - name: Upload the package to a release - if: github.repository == 'loxilb-io/loxilb' + - name: Build loxilb deb package with given tag + if: github.event.inputs.tagName != '' + run: git clone https://github.com/loxilb-io/tools.git build-tools && cd build-tools/pkg/ && make major=${{ github.event.inputs.tagName }} && cd - + - name: Build loxilb deb package with latest + if: github.event.inputs.tagName == '' + run: git clone https://github.com/loxilb-io/tools.git build-tools && cd build-tools/pkg/ && make major=latest && cd - + - name: Upload the package to a release with given tag + if: | + github.repository == 'loxilb-io/loxilb' + && github.event.inputs.tagName != '' uses: ncipollo/release-action@v1 with: tag: v${{ github.event.inputs.tagName }} allowUpdates: true artifacts: "build-tools/pkg/*.deb" + - name: Upload the package to a release with latest tag + if: | + github.repository == 'loxilb-io/loxilb' + && github.event.inputs.tagName == '' + uses: ncipollo/release-action@v1 + with: + tag: vlatest + allowUpdates: true + artifacts: "build-tools/pkg/*.deb"