From 28ea811f95eb56310e074d23510622d5b5e1371b Mon Sep 17 00:00:00 2001 From: farfalleflickan <6597735+farfalleflickan@users.noreply.github.com> Date: Fri, 10 Jan 2025 21:15:40 +0000 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b73fb52..10cb867 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,14 +20,12 @@ jobs: - name: Build DEB run: | - # Your command that ultimately places a .deb file under deb/ make deb - name: Upload DEB artifact uses: actions/upload-artifact@v3 with: name: deb-package - # Upload all .deb files in deb/ (assuming only one is created) path: deb/*.deb create-release: @@ -40,11 +38,13 @@ jobs: name: deb-package path: . - - name: Find the DEB filename + - name: Find the DEB filename and extract version id: find_deb run: | - # We expect exactly one .deb in the current directory - echo "deb_file=$(ls *.deb)" >> $GITHUB_OUTPUT + DEB_FILE=$(ls *.deb) + echo "deb_file=$DEB_FILE" >> $GITHUB_OUTPUT + VERSION=$(echo "$DEB_FILE" | sed -E 's/^.*_([0-9.]+)_.*/\1/') + echo "version=$VERSION" >> $GITHUB_OUTPUT - name: Create or Update GitHub Release id: create_release @@ -52,9 +52,9 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ github.ref_name }} - release_name: "Release ${{ github.ref_name }}" - draft: true + tag_name: ${{ steps.find_deb.outputs.version }} + release_name: "cmyflix v${{ steps.find_deb.outputs.version }}" + draft: true prerelease: false - name: Upload DEB to Release