Skip to content

Commit

Permalink
[chore] Release to scoop, winget, chocolatey
Browse files Browse the repository at this point in the history
  • Loading branch information
robinovitch61 committed Jan 15, 2024
1 parent 37c1f2b commit 787d90b
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: build
on:
pull_request:
push:
workflow_dispatch:

jobs:
goreleaser:
Expand All @@ -29,3 +30,4 @@ jobs:
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
AUR_KEY: ${{ secrets.AUR_KEY }}
NUR_PACKAGES_GITHUB_TOKEN: ${{ secrets.NUR_PACKAGES_GITHUB_TOKEN }}
CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }}
19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ on:
create:
tags:
- v*
workflow_dispatch:

permissions:
contents: write

env:
CHOCOLATEY_VERSION: 2.2.2

jobs:
goreleaser:
runs-on: ubuntu-latest
Expand All @@ -24,6 +28,20 @@ jobs:
fetch-depth: 0
- name: Install Nix
uses: cachix/install-nix-action@v23
- name: Install Snapcraft & Chocolatey
# from https://github.com/twpayne/chezmoi/blob/5293b40b48e678c461d68d06b635010173cac970/.github/workflows/main.yml#L154C1-L167C38
run: |
sudo apt-get --quiet update
sudo apt-get --no-install-suggests --no-install-recommends --quiet --yes install musl-tools snapcraft
# https://github.com/goreleaser/goreleaser/issues/1715
# https://bugs.launchpad.net/snapcraft/+bug/1889741
mkdir -p "${HOME}/.cache/snapcraft/download"
mkdir -p "${HOME}/.cache/snapcraft/stage-packages"
mkdir -p /opt/chocolatey
wget -q -O - "https://github.com/chocolatey/choco/releases/download/${CHOCOLATEY_VERSION}/chocolatey.v${CHOCOLATEY_VERSION}.tar.gz" | tar -xz -C "/opt/chocolatey"
echo '#!/bin/bash' >> /usr/local/bin/choco
echo 'mono /opt/chocolatey/choco.exe $@' >> /usr/local/bin/choco
chmod +x /usr/local/bin/choco
- name: Set up Go
uses: actions/setup-go@v4
with:
Expand All @@ -39,3 +57,4 @@ jobs:
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
AUR_KEY: ${{ secrets.AUR_KEY }}
NUR_PACKAGES_GITHUB_TOKEN: ${{ secrets.NUR_PACKAGES_GITHUB_TOKEN }}
CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ dist/
id_ed25519*
vendor
ignore.gif
**/*/my_logs.txt
**/*/my_logs.txt
opt
59 changes: 58 additions & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ builds:
- windows

archives:
- name_template: >-
- format_overrides:
- goos: windows
format: zip
name_template: >-
{{ .ProjectName }}_{{ .Version }}_
{{- if eq .Os "darwin" }}Darwin
{{- else if eq .Os "linux" }}Linux
Expand Down Expand Up @@ -98,5 +101,59 @@ nix:
branch: main
token: "{{ .Env.NUR_PACKAGES_GITHUB_TOKEN }}"

winget:
- name: wander
publisher: robinovitch61
license: MIT
copyright: "Leo Robinovitch"
homepage: https://github.com/robinovitch61/wander
short_description: "An efficient terminal application/TUI for interacting with your HashiCorp Nomad cluster."
package_identifier: "robinovitch61.wander"
repository:
owner: "robinovitch61"
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
name: winget-pkgs
branch: "{{.ProjectName}}-{{.Version}}"
pull_request:
enabled: true
draft: false
base:
owner: microsoft
name: winget-pkgs
branch: master

scoops:
- repository:
owner: "robinovitch61"
name: scoop-bucket
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
commit_author:
name: goreleaserbot
email: [email protected]
homepage: https://github.com/robinovitch61/wander
description: "An efficient terminal application/TUI for interacting with your HashiCorp Nomad cluster."
license: MIT

chocolateys:
- owners: "Leo Robinovitch"
authors: "Leo Robinovitch"
project_url: https://github.com/robinovitch61/wander
url_template: "https://github.com/robinovitch61/wander/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
license_url: https://github.com/robinovitch61/wander/blob/main/LICENSE
require_license_acceptance: false
project_source_url: https://github.com/robinovitch61/wander
docs_url: https://github.com/robinovitch61/wander/blob/main/README.md
bug_tracker_url: https://github.com/robinovitch61/wander/issues
tags: "wander nomad hashicorp tui"
summary: "An efficient terminal application/TUI for interacting with your HashiCorp Nomad cluster."
description: |
# An efficient terminal application/TUI for interacting with your HashiCorp Nomad cluster.
https://github.com/robinovitch61/wander for installation, configuration, and usage instructions.
release_notes: "https://github.com/robinovitch61/wander/releases/tag/v{{ .Version }}"
api_key: "{{ .Env.CHOCOLATEY_API_KEY }}"
source_repo: "https://push.chocolatey.org/"
skip_publish: false

gomod:
proxy: true

0 comments on commit 787d90b

Please sign in to comment.