Skip to content

Commit

Permalink
fix(ci): workflows/chocolatey.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Mar 27, 2024
1 parent fe83be2 commit bf27ed3
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/chocolatey.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down Expand Up @@ -39,17 +39,23 @@ 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
run: choco pack
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

0 comments on commit bf27ed3

Please sign in to comment.