Skip to content

Commit bb6f952

Browse files
twpaynebradenhilton
andcommittedSep 21, 2023
feat: Use Goreleaser's Chocolatey support
Co-authored-by: Braden Hilton <hiltonbraden@gmail.com>
1 parent c96a4b7 commit bb6f952

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed
 

‎.github/workflows/main.yml

+11
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
env:
1212
ACTIONLINT_VERSION: 1.6.25
1313
AGE_VERSION: 1.1.1
14+
CHOCOLATEY_VERSION: 2.2.2
1415
GO_VERSION: 1.21.1
1516
GOFUMPT_VERSION: 0.4.0
1617
GOLANGCI_LINT_VERSION: 1.54.2
@@ -185,6 +186,11 @@ jobs:
185186
# https://bugs.launchpad.net/snapcraft/+bug/1889741
186187
mkdir -p "${HOME}/.cache/snapcraft/download"
187188
mkdir -p "${HOME}/.cache/snapcraft/stage-packages"
189+
mkdir -p /opt/chocolatey
190+
wget -q -O - "https://github.com/chocolatey/choco/releases/download/${CHOCOLATEY_VERSION}/chocolatey.v${CHOCOLATEY_VERSION}.tar.gz" | tar -xz -C "/opt/chocolatey"
191+
echo '#!/bin/bash' >> /usr/local/bin/choco
192+
echo 'mono /opt/chocolatey/choco.exe $@' >> /usr/local/bin/choco
193+
chmod +x /usr/local/bin/choco
188194
- name: create-syso
189195
run: |
190196
make create-syso
@@ -387,6 +393,11 @@ jobs:
387393
# https://bugs.launchpad.net/snapcraft/+bug/1889741
388394
mkdir -p "${HOME}/.cache/snapcraft/download"
389395
mkdir -p "${HOME}/.cache/snapcraft/stage-packages"
396+
mkdir -p /opt/chocolatey
397+
wget -q -O - "https://github.com/chocolatey/choco/releases/download/${CHOCOLATEY_VERSION}/chocolatey.v${CHOCOLATEY_VERSION}.tar.gz" | tar -xz -C "/opt/chocolatey"
398+
echo '#!/bin/bash' >> /usr/local/bin/choco
399+
echo 'mono /opt/chocolatey/choco.exe $@' >> /usr/local/bin/choco
400+
chmod +x /usr/local/bin/choco
390401
- name: check-snapcraft-credentials
391402
run: snapcraft whoami
392403
env:

‎.goreleaser.yaml

+26
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,32 @@ nfpms:
200200
- apk
201201
bindir: /usr/bin
202202

203+
chocolateys:
204+
- owners: twpayne
205+
authors: Tom Payne
206+
project_url: https://chezmoi.io
207+
url_template: "https://github.com/twpayne/chezmoi/releases/download/v{{ .Version }}/{{ .ArtifactName }}"
208+
icon_url: https://github.com/twpayne/chezmoi/raw/master/assets/images/logo-144px.png
209+
copyright: Copyright © Tom Payne, 2018-2023
210+
license_url: https://github.com/twpayne/chezmoi/blob/master/LICENSE
211+
project_source_url: https://github.com/twpayne/chezmoi
212+
docs_url: https://chezmoi.io
213+
bug_tracker_url: https://github.com/twpayne/chezmoi/issues
214+
tags: configuration dotfile dotfiles
215+
summary: Manage your dotfiles across multiple diverse machines, securely.
216+
description: |
217+
## What does chezmoi do?
218+
219+
chezmoi helps you manage your personal configuration files (dotfiles, like `~/.gitconfig`) across multiple machines.
220+
221+
chezmoi is helpful if you have spent time customizing the tools you use (e.g. shells, editors, and version control systems) and want to keep machines running different accounts (e.g. home and work) and/or different operating systems (e.g. Linux, macOS, and Windows) in sync, while still being able to easily cope with differences from machine to machine.
222+
223+
chezmoi scales from the trivial (e.g. copying a few dotfiles onto a Raspberry Pi, development container, or virtual machine) to complex long-lived multi-machine development environments (e.g. keeping any number of home and work, Linux, macOS, and Windows machines in sync). In all cases you only need to maintain a single source of truth (a single branch in git) and getting started only requires adding a single binary to your machine (which you can do with `curl`, `wget`, or `scp`).
224+
225+
chezmoi has strong support for security, allowing you to manage secrets (e.g. passwords, access tokens, and private keys) securely and seamlessly using a password manager and/or encrypt whole files with your favorite encryption tool.
226+
release_notes: "https://github.com/twpayne/chezmoi/releases/tag/v{{ .Version }}"
227+
api_key: '{{ .Env.CHOCOLATEY_API_KEY }}'
228+
203229
release:
204230
extra_files:
205231
- glob: ./assets/cosign/cosign.pub

0 commit comments

Comments
 (0)