Skip to content

Commit 787d90b

Browse files
committed
[chore] Release to scoop, winget, chocolatey
1 parent 37c1f2b commit 787d90b

File tree

4 files changed

+81
-2
lines changed

4 files changed

+81
-2
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: build
33
on:
44
pull_request:
55
push:
6+
workflow_dispatch:
67

78
jobs:
89
goreleaser:
@@ -29,3 +30,4 @@ jobs:
2930
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
3031
AUR_KEY: ${{ secrets.AUR_KEY }}
3132
NUR_PACKAGES_GITHUB_TOKEN: ${{ secrets.NUR_PACKAGES_GITHUB_TOKEN }}
33+
CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }}

.github/workflows/release.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@ on:
1010
create:
1111
tags:
1212
- v*
13+
workflow_dispatch:
1314

1415
permissions:
1516
contents: write
1617

18+
env:
19+
CHOCOLATEY_VERSION: 2.2.2
20+
1721
jobs:
1822
goreleaser:
1923
runs-on: ubuntu-latest
@@ -24,6 +28,20 @@ jobs:
2428
fetch-depth: 0
2529
- name: Install Nix
2630
uses: cachix/install-nix-action@v23
31+
- name: Install Snapcraft & Chocolatey
32+
# from https://github.com/twpayne/chezmoi/blob/5293b40b48e678c461d68d06b635010173cac970/.github/workflows/main.yml#L154C1-L167C38
33+
run: |
34+
sudo apt-get --quiet update
35+
sudo apt-get --no-install-suggests --no-install-recommends --quiet --yes install musl-tools snapcraft
36+
# https://github.com/goreleaser/goreleaser/issues/1715
37+
# https://bugs.launchpad.net/snapcraft/+bug/1889741
38+
mkdir -p "${HOME}/.cache/snapcraft/download"
39+
mkdir -p "${HOME}/.cache/snapcraft/stage-packages"
40+
mkdir -p /opt/chocolatey
41+
wget -q -O - "https://github.com/chocolatey/choco/releases/download/${CHOCOLATEY_VERSION}/chocolatey.v${CHOCOLATEY_VERSION}.tar.gz" | tar -xz -C "/opt/chocolatey"
42+
echo '#!/bin/bash' >> /usr/local/bin/choco
43+
echo 'mono /opt/chocolatey/choco.exe $@' >> /usr/local/bin/choco
44+
chmod +x /usr/local/bin/choco
2745
- name: Set up Go
2846
uses: actions/setup-go@v4
2947
with:
@@ -39,3 +57,4 @@ jobs:
3957
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
4058
AUR_KEY: ${{ secrets.AUR_KEY }}
4159
NUR_PACKAGES_GITHUB_TOKEN: ${{ secrets.NUR_PACKAGES_GITHUB_TOKEN }}
60+
CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ dist/
88
id_ed25519*
99
vendor
1010
ignore.gif
11-
**/*/my_logs.txt
11+
**/*/my_logs.txt
12+
opt

.goreleaser.yaml

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ builds:
2121
- windows
2222

2323
archives:
24-
- name_template: >-
24+
- format_overrides:
25+
- goos: windows
26+
format: zip
27+
name_template: >-
2528
{{ .ProjectName }}_{{ .Version }}_
2629
{{- if eq .Os "darwin" }}Darwin
2730
{{- else if eq .Os "linux" }}Linux
@@ -98,5 +101,59 @@ nix:
98101
branch: main
99102
token: "{{ .Env.NUR_PACKAGES_GITHUB_TOKEN }}"
100103

104+
winget:
105+
- name: wander
106+
publisher: robinovitch61
107+
license: MIT
108+
copyright: "Leo Robinovitch"
109+
homepage: https://github.com/robinovitch61/wander
110+
short_description: "An efficient terminal application/TUI for interacting with your HashiCorp Nomad cluster."
111+
package_identifier: "robinovitch61.wander"
112+
repository:
113+
owner: "robinovitch61"
114+
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
115+
name: winget-pkgs
116+
branch: "{{.ProjectName}}-{{.Version}}"
117+
pull_request:
118+
enabled: true
119+
draft: false
120+
base:
121+
owner: microsoft
122+
name: winget-pkgs
123+
branch: master
124+
125+
scoops:
126+
- repository:
127+
owner: "robinovitch61"
128+
name: scoop-bucket
129+
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
130+
commit_author:
131+
name: goreleaserbot
132+
email: goreleaserbot@theleo.zone
133+
homepage: https://github.com/robinovitch61/wander
134+
description: "An efficient terminal application/TUI for interacting with your HashiCorp Nomad cluster."
135+
license: MIT
136+
137+
chocolateys:
138+
- owners: "Leo Robinovitch"
139+
authors: "Leo Robinovitch"
140+
project_url: https://github.com/robinovitch61/wander
141+
url_template: "https://github.com/robinovitch61/wander/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
142+
license_url: https://github.com/robinovitch61/wander/blob/main/LICENSE
143+
require_license_acceptance: false
144+
project_source_url: https://github.com/robinovitch61/wander
145+
docs_url: https://github.com/robinovitch61/wander/blob/main/README.md
146+
bug_tracker_url: https://github.com/robinovitch61/wander/issues
147+
tags: "wander nomad hashicorp tui"
148+
summary: "An efficient terminal application/TUI for interacting with your HashiCorp Nomad cluster."
149+
description: |
150+
# An efficient terminal application/TUI for interacting with your HashiCorp Nomad cluster.
151+
152+
https://github.com/robinovitch61/wander for installation, configuration, and usage instructions.
153+
release_notes: "https://github.com/robinovitch61/wander/releases/tag/v{{ .Version }}"
154+
api_key: "{{ .Env.CHOCOLATEY_API_KEY }}"
155+
source_repo: "https://push.chocolatey.org/"
156+
skip_publish: false
157+
101158
gomod:
102159
proxy: true

0 commit comments

Comments
 (0)