Skip to content

Commit 3b08c1d

Browse files
authored
Merge pull request #2 from theurzil/chore/update-ci-and-release-config
Chore/update ci and release config
1 parent 186d762 commit 3b08c1d

File tree

2 files changed

+46
-3
lines changed

2 files changed

+46
-3
lines changed

.github/workflows/release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: release-please
2+
on:
3+
push:
4+
branches:
5+
- master
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
release-please:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: googleapis/release-please-action@v4
17+
id: release
18+
with:
19+
release-type: go
20+
21+
- name: Checkout
22+
if: ${{ steps.release.outputs.release_created }}
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Go
26+
if: ${{ steps.release.outputs.release_created }}
27+
uses: actions/setup-go@v6
28+
with:
29+
go-version-file: 'go.mod'
30+
31+
- name: Install Mage
32+
if: ${{ steps.release.outputs.release_created }}
33+
run: go install github.com/magefile/mage@latest
34+
35+
- name: Run full CI validation
36+
if: ${{ steps.release.outputs.release_created }}
37+
run: mage ci

.pre-commit-config.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,15 @@ repos:
1616
hooks:
1717
- id: golangci-lint
1818

19-
- repo: https://github.com/dnephin/pre-commit-golang
20-
rev: v0.5.1
19+
- repo: local
2120
hooks:
2221
- id: go-fmt
23-
- id: go-imports
22+
name: go-fmt
23+
entry: gofmt -l -s -w
24+
language: system
25+
files: \.go$
2426
- id: go-mod-tidy
27+
name: go-mod-tidy
28+
entry: go mod tidy
29+
language: system
30+
files: go.mod

0 commit comments

Comments
 (0)