Skip to content

Add Chocolatey GoReleaser config #13

Add Chocolatey GoReleaser config

Add Chocolatey GoReleaser config #13

Workflow file for this run

name: release
on:
pull_request:
push:
# run only against tags
tags:
- "*"
permissions:
contents: write
packages: write
id-token: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
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:
go-version: stable
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
version: "~> v2"
args: release --clean
env:
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 }}
KO_DOCKER_REPO: ghcr.io/${{ github.repository }}
SCOOP_SSH_KEY: ${{ secrets.SCOOP_SSH_KEY }}