Skip to content

Commit

Permalink
wip: chocolatey CI action
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
  • Loading branch information
lidel committed Oct 13, 2020
1 parent c62a96c commit 71f9e96
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/chocolatey.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: chocolatey

on: [push]
# 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: 0.13.2 # todo: replace with github.event.release.name
release_tag: v0.13.2 # todo: replace with github.event.release.tag_name

jobs:
publish:
runs-on: windows-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v1

- name: Install Node.js for update script
uses: actions/setup-node@v1
with:
node-version: 12.x

- name: Cache bigger downloads
uses: actions/cache@v2
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 artifact
run: curl -s -L -o "IPFS-Desktop-Setup-${{ env.release_name }}.exe" "https://github.com/ipfs-shipyard/ipfs-desktop/releases/download/${{ env.release_tag }}/IPFS-Desktop-Setup-${{ env.release_name }}.exe"

- name: Update version, URL and hash in manifests
run: node pkgs\chocolatey\update.js ${{ env.release_name }}

- name: Create .nupkg
run: cd pkgs\chocolatey && choco pack

- name: Publish to Chocolatey
run: echo "TODO :-) ${{ env.release_name }} / ${{ env.release_tag }}"

0 comments on commit 71f9e96

Please sign in to comment.