0.31.0 #47
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: chocolatey | |
on: | |
workflow_dispatch: | |
inputs: | |
manual_name: | |
required: true | |
description: 'Release number to publish (without v prefix)' | |
default: '0.0.0' | |
release: | |
types: [published] | |
env: | |
XDG_CACHE_HOME: ${{ github.workspace }}/.cache | |
ELECTRON_CACHE: ${{ github.workspace }}/.cache/electron | |
ELECTRON_BUILDER_CACHE: ${{ github.workspace }}/.cache/electron-builder | |
release_name: ${{ github.event.inputs.manual_name || github.event.release.name }} | |
jobs: | |
publish: | |
runs-on: windows-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '14' | |
- name: Cache bigger downloads | |
uses: actions/cache@v3 | |
id: cache | |
with: | |
path: ${{ github.workspace }}/.cache | |
key: ${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'electron-builder.yml') }} | |
restore-keys: | | |
${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'electron-builder.yml') }} | |
${{ runner.os }}- | |
- 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 pkgs\chocolatey\update.mjs ${{ env.release_name }} | |
- name: Create .nupkg | |
run: cd pkgs\chocolatey && choco pack | |
- name: Publish to Chocolatey | |
run: choco push pkgs/chocolatey/ipfs-desktop.${{ env.release_name }}.nupkg --key ${{ secrets.chocolatey_key }} --source "https://push.chocolatey.org" |