From bf27ed380ef10ab93d0668739307b0be07504c36 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Wed, 27 Mar 2024 19:25:34 +0100 Subject: [PATCH] fix(ci): workflows/chocolatey.yml --- .github/workflows/chocolatey.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/chocolatey.yml b/.github/workflows/chocolatey.yml index 8acc58032..5d414cf56 100644 --- a/.github/workflows/chocolatey.yml +++ b/.github/workflows/chocolatey.yml @@ -5,8 +5,8 @@ on: inputs: manual_name: required: true - description: 'Release number to publish (without v prefix)' - default: '0.0.0' + description: 'Release number to publish' + default: 'v0.0.0' release: types: [published] @@ -39,11 +39,17 @@ jobs: ${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'electron-builder.yml') }} ${{ runner.os }}- + - name: Strip 'v' prefix and save as CHOCO_RELEASE_NAME + id: name + run: | + TAG=${{ github.event.inputs.manual_name || github.event.release.name }} + echo "CHOCO_RELEASE_NAME=${TAG#v}" >> $GITHUB_ENV + - name: Install dependencies run: npm ci --prefer-offline --no-audit --progress=false --cache ${{ github.workspace }}/.cache/npm - name: Download .exe, update version, URL and hash - run: node update.mjs ${{ env.release_name }} + run: node update.mjs ${{ env.CHOCO_RELEASE_NAME }} working-directory: .\pkgs\chocolatey - name: Create .nupkg @@ -51,5 +57,5 @@ jobs: working-directory: .\pkgs\chocolatey - name: Publish to Chocolatey - run: choco push ipfs-desktop.${{ env.release_name }}.nupkg --key ${{ secrets.chocolatey_key }} --source "https://push.chocolatey.org" + run: choco push ipfs-desktop.${{ env.CHOCO_RELEASE_NAME }}.nupkg --key ${{ secrets.chocolatey_key }} --source "https://push.chocolatey.org" working-directory: .\pkgs\chocolatey