Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add chocolatey #4615

Merged
merged 5 commits into from
Apr 6, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 17 additions & 5 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,30 @@ on:
jobs:
release:
runs-on: ubuntu-latest
env:
# https://github.com/actions/setup-go#supported-version-syntax
# ex:
# - 1.18beta1 -> 1.18.0-beta.1
# - 1.18rc1 -> 1.18.0-rc.1
GO_VERSION: '1.22'
CHOCOLATEY_VERSION: 2.2.0
steps:
- uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
# https://github.com/actions/setup-go#supported-version-syntax
# ex:
# - 1.18beta1 -> 1.18.0-beta.1
# - 1.18rc1 -> 1.18.0-rc.1
go-version: '1.22'
go-version: ${{ env.GO_VERSION }}
- name: Unshallow
run: git fetch --prune --unshallow

- 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

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

Expand All @@ -35,4 +46,5 @@ jobs:
version: latest
args: release --clean --timeout=90m
env:
CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GOLANGCI_LINT_TOKEN }}
27 changes: 27 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,33 @@ brews:
test: |
system "#{bin}/golangci-lint --version"

chocolateys:
- name: golangci-lint
ids:
- windows
owners: golangci
title: Golangci-lint
ldez marked this conversation as resolved.
Show resolved Hide resolved
authors: golangci
project_url: https://golangci-lint.run
url_template: "https://github.com/golangci/golangci-lint/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
icon_url: "https://cdn.rawgit.com/golangci/golangci-lint/master/assets/go.png"
ldez marked this conversation as resolved.
Show resolved Hide resolved
copyright: 2024 GolangCI
license_url: https://github.com/golangci/golangci-lint/blob/master/LICENSE
ldez marked this conversation as resolved.
Show resolved Hide resolved
require_license_acceptance: false
ldez marked this conversation as resolved.
Show resolved Hide resolved
project_source_url: https://github.com/golangci/golangci-lint
docs_url: https://golangci-lint.run
bug_tracker_url: https://github.com/golangci/golangci-lint/issues
tags: "go golang lint linter"
summary: Fast linters Runner for Go
description: |
{{ .ProjectName }} installer package.
Fast linters Runner for Go .
release_notes: "https://github.com/golangci/golangci-lint/releases/tag/v{{ .Version }}"
ldez marked this conversation as resolved.
Show resolved Hide resolved
api_key: "{{ .Env.CHOCOLATEY_API_KEY }}"
source_repo: "https://push.chocolatey.org/"
skip_publish: false
goamd64: v1

nfpms:
-
id: golangci-lint-nfpms
Expand Down