Skip to content

Commit

Permalink
Add Chocolatey GoReleaser config
Browse files Browse the repository at this point in the history
  • Loading branch information
pbar1 committed Nov 10, 2024
1 parent be2cdc6 commit d895754
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 42 deletions.
3 changes: 3 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export SCOOP_SSH_KEY=test
export HOMEBREW_SSH_KEY=test
export KO_DOCKER_REPO=ghcr.io/pbar1/mfaws
17 changes: 15 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@ jobs:
with:
fetch-depth: 0

# https://github.com/robinovitch61/goreleaser-testing/blob/603ecf99e1fc8832d51ffa3d7337f6d5af61471c/.github/workflows/release.yml#L30-L42
# from https://github.com/twpayne/chezmoi/blob/5293b40b48e678c461d68d06b635010173cac970/.github/workflows/main.yml#L154C1-L167C38
- name: Install Chocolatey
run: |
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
env:
CHOCOLATEY_VERSION: 2.3.0

- name: Set up Go
uses: actions/setup-go@v5
with:
Expand All @@ -32,8 +44,9 @@ jobs:
version: "~> v2"
args: release --clean
env:
AUR_KEY: ${{ secrets.AUR_KEY }}
AUR_SSH_KEY: ${{ secrets.AUR_SSH_KEY }}
CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_SSH_KEY: ${{ secrets.HOMEBREW_SSH_KEY }}
SCOOP_SSH_KEY: ${{ secrets.SCOOP_SSH_KEY }}
KO_DOCKER_REPO: ghcr.io/${{ github.repository }}
SCOOP_SSH_KEY: ${{ secrets.SCOOP_SSH_KEY }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ build/package/choco/LICENSE.txt
*.diff
.vscode/*
**/.DS_Store
.env*
result
21 changes: 20 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,23 @@ aurs:
- homepage: https://github.com/pbar1/{{ .ProjectName }}
description: AWS multi-factor authentication manager
git_url: "ssh://aur@aur.archlinux.org/{{ .ProjectName }}-bin.git"
private_key: "{{ .Env.AUR_KEY }}"
private_key: "{{ .Env.AUR_SSH_KEY }}"

chocolateys:
- owners: Pierce Bartine
authors: Pierce Bartine
project_url: https://github.com/pbar1/{{ .ProjectName }}
url_template: https://github.com/pbar1/{{ .ProjectName }}/releases/download/{{
.Tag }}/{{ .ArtifactName }}
license_url: https://github.com/pbar1/{{ .ProjectName }}/blob/develop/LICENSE
require_license_acceptance: false
project_source_url: https://github.com/pbar1/{{ .ProjectName }}
docs_url: https://github.com/pbar1/{{ .ProjectName }}
bug_tracker_url: https://github.com/pbar1/{{ .ProjectName }}/issues
tags: "mfaws aws mfa 2fa two-factor-authentication multi-factor-authentication
amazon-web-services aws-sts sts awsmfa aws-mfa"
summary: AWS multi-factor authentication manager
description: AWS multi-factor authentication manager
release_notes: "https://github.com/pbar1/{{ .ProjectName }}/releases/tag/v{{ .Version }}"
api_key: "{{ .Env.CHOCOLATEY_API_KEY }}"
source_repo: "https://push.chocolatey.org/"
3 changes: 0 additions & 3 deletions build/package/choco/VERIFICATION.txt

This file was deleted.

24 changes: 0 additions & 24 deletions build/package/choco/mfaws.nuspec.template

This file was deleted.

11 changes: 0 additions & 11 deletions build/package/choco/pack.sh

This file was deleted.

0 comments on commit d895754

Please sign in to comment.