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 989f620
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
47 changes: 47 additions & 0 deletions .github/workflows/chocolatey.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
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, update version, URL and hash
run: node pkgs\chocolatey\update.js ${{ 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"
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ jobs:
# Apple signing
mac_certs: ${{ secrets.mac_certs }}
mac_certs_password: ${{ secrets.mac_certs_password }}
# TODO: secrets forsnap, chocolatey
env:
CI_BUILD_TAG: ${{steps.tag.outputs.tag}} # used by --publish onTag
# Apple notarization
Expand Down

0 comments on commit 989f620

Please sign in to comment.