Skip to content

Commit

Permalink
ci: updated and fixed a bunch of issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mvisonneau committed Apr 17, 2024
1 parent b5931fc commit 07c175a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,52 +17,52 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

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

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2

- name: docker.io Login
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
registry: docker.io
username: ${{ github.repository_owner }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: ghcr.io login
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GH_PAT }}

- name: quay.io Login
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ github.repository_owner }}
password: ${{ secrets.QUAY_TOKEN }}

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.22'

- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v3
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}

- name: Install goreleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v5
with:
version: v1.15.2
version: v1.25.1
install-only: true

- name: Run goreleaser
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,26 @@ jobs:
matrix:
os:
- ubuntu-22.04
- macos-11.0
- macos-14
- windows-2022

runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.22'

- name: Lint
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: make lint

- name: Test
run: make coverage
run: make test

- name: Publish coverage to coveralls.io
uses: shogo82148/actions-goveralls@v1
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ REPOSITORY := mvisonneau/$(NAME)

.PHONY: fmt
fmt: ## Format source code
go run mvdan.cc/gofumpt@v0.4.0 -w $(shell git ls-files **/*.go)
go run github.com/daixiang0/gci@v0.9.1 write -s standard -s default -s "prefix(github.com/mvisonneau)" .
go run mvdan.cc/gofumpt@v0.6.0 -w $(shell git ls-files **/*.go)
go run github.com/daixiang0/gci@v0.13.4 write -s standard -s default -s "prefix(github.com/mvisonneau)" .

.PHONY: lint
lint: ## Run all lint related tests upon the codebase
go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.1 run -v --fast
go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.57.2 run -v --fast

.PHONY: test
test: ## Run the tests against the codebase
Expand All @@ -31,7 +31,7 @@ build: ## Build the binaries using local GOOS
go build ./cmd/$(NAME)

.PHONY: prerelease
prerelease: setup ## Build & prerelease the binaries (edge)
prerelease: ## Build & prerelease the binaries (edge)
@\
REPOSITORY=$(REPOSITORY) \
NAME=$(NAME) \
Expand Down

0 comments on commit 07c175a

Please sign in to comment.