From 10b42cc0692294f42f4171fbf7bcb1389c5c979c Mon Sep 17 00:00:00 2001 From: swapnil sinha Date: Mon, 8 Jul 2024 16:32:24 -0700 Subject: [PATCH] updated .yml --- .github/workflows/build-deb.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-deb.yml b/.github/workflows/build-deb.yml index 79d4bb6..c63ed4b 100644 --- a/.github/workflows/build-deb.yml +++ b/.github/workflows/build-deb.yml @@ -2,6 +2,8 @@ name: Build and Release DEB Package on: push: + tags: + - '*' jobs: rpm-release: @@ -51,23 +53,25 @@ jobs: - name: Build DEB package run: dpkg-deb --build nagios-plugins-ets-1.4 + - name: Extract tag name + id: extract_tag + run: echo "::set-output name=tag::${GITHUB_REF#refs/tags/}" + - name: Create Release id: create_release uses: softprops/action-gh-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} + tag_name: ${{ steps.extract_tag.outputs.tag }} + name: Release ${{ steps.extract_tag.outputs.tag }} draft: false prerelease: false - name: Upload DEB package to Release - id: upload_deb uses: softprops/action-gh-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: files: ./nagios-plugins-ets-1.4.deb content_type: application/vnd.debian.binary-package - release_id: ${{ steps.create_release.outputs.id }}