Skip to content

Commit

Permalink
chore: switch to jdkato/choco-cross
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkato committed Jun 8, 2024
1 parent b193fde commit 0cd48f3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 23 deletions.
21 changes: 2 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,14 @@ jobs:
with:
go-version: "1.21"

- 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: 1.3.1

- name: Test Chocolatey
run: |
choco help
- name: Setup release environment
run: |-
echo 'GITHUB_TOKEN=${{secrets.GITHUB_TOKEN}}' > .release-env
echo 'CHOCOLATEY_API_KEY=${{secrets.CHOCOLATEY_API_KEY}}' >> .release-env
- name: "GoReleaser"
run: make gr
- name: GoReleaser
run: make choco-cross
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }}

lint:
name: runner / vale
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ fixtures/formats/Sphinx/_build/
*.sublime-workspace
*.sublime-project

.release-env

# Files
*.o
*.a
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PACKAGE_NAME := github.com/errata-ai/vale/v3
GOLANG_CROSS_VERSION ?= v1.19.5
GOLANG_CROSS_VERSION ?= v0.1.0

SYSROOT_DIR ?= sysroots
SYSROOT_ARCHIVE ?= sysroots.tar.bz2
Expand All @@ -9,7 +9,7 @@ CURR_SHA=$(shell git rev-parse --verify HEAD)

LDFLAGS=-ldflags "-s -w -X main.version=$(LAST_TAG)"

.PHONY: data test lint install rules setup bench compare release gr
.PHONY: data test lint install rules setup bench compare release choco-cross

all: build

Expand Down Expand Up @@ -63,7 +63,7 @@ docker:
--push \
.

gr:
choco-cross:
@docker run \
--rm \
-e CGO_ENABLED=1 \
Expand All @@ -72,5 +72,5 @@ gr:
-v `pwd`:/go/src/$(PACKAGE_NAME) \
-v `pwd`/sysroot:/sysroot \
-w /go/src/$(PACKAGE_NAME) \
ghcr.io/goreleaser/goreleaser-cross:${GOLANG_CROSS_VERSION} \
jdkato/choco-cross:${GOLANG_CROSS_VERSION} \
release --clean

0 comments on commit 0cd48f3

Please sign in to comment.