From a2d888c31c953df8fecda807cf932397330d00a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20T=C3=B6lle?= Date: Sun, 24 Aug 2025 15:47:46 +0200 Subject: [PATCH] chore: use mise to install all tools in CI and locally Makes sure that I have the same versions locally as CI --- .github/workflows/ci.yaml | 19 +++++-------------- .github/workflows/release.yaml | 6 +----- .github/workflows/releaser-pleaser.yaml | 10 +++------- mise.toml | 10 ++++++++++ 4 files changed, 19 insertions(+), 26 deletions(-) create mode 100644 mise.toml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9d137dc..75e33e4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -2,7 +2,7 @@ name: ci on: push: - branches: [main] + branches: [ main ] pull_request: jobs: @@ -12,15 +12,12 @@ jobs: - name: Checkout uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 - - name: Set up Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5 - with: - go-version-file: go.mod + - uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3 - name: Run golangci-lint uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8 with: - version: v2.4.0 # renovate: datasource=github-releases depName=golangci/golangci-lint + install-mode: none args: --timeout 5m test: @@ -29,10 +26,7 @@ jobs: - name: Checkout uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 - - name: Set up Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5 - with: - go-version-file: go.mod + - uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3 - name: Run tests run: go test -v -race -coverpkg=./... -coverprofile=coverage.txt ./... @@ -48,10 +42,7 @@ jobs: - name: Checkout uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 - - name: Set up Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5 - with: - go-version-file: go.mod + - uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3 - name: Run go mod tidy run: go mod tidy diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index bcc947d..1374fd6 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -16,10 +16,6 @@ jobs: - name: Checkout uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 - - name: Set up Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5 - with: - go-version-file: go.mod + - uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3 - - uses: ko-build/setup-ko@d006021bd0c28d1ce33a07e7943d48b079944c8d # v0.9 - run: ko build --bare --tags ${{ github.ref_name }} github.com/apricote/releaser-pleaser/cmd/rp diff --git a/.github/workflows/releaser-pleaser.yaml b/.github/workflows/releaser-pleaser.yaml index 6e79306..5536579 100644 --- a/.github/workflows/releaser-pleaser.yaml +++ b/.github/workflows/releaser-pleaser.yaml @@ -2,7 +2,7 @@ name: releaser-pleaser on: push: - branches: [main] + branches: [ main ] # Using pull_request_target to avoid tainting the actual release PR with code from open feature pull requests pull_request_target: types: @@ -17,7 +17,7 @@ concurrency: group: releaser-pleaser cancel-in-progress: true -permissions: {} +permissions: { } jobs: releaser-pleaser: @@ -29,15 +29,11 @@ jobs: with: ref: main - - name: Set up Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5 - with: - go-version-file: go.mod + - uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3 # Build container image from current commit and replace image ref in `action.yml` # Without this, any new flags in `action.yml` would break the job in this repository until the new # version is released. But a new version can only be released if this job works. - - uses: ko-build/setup-ko@d006021bd0c28d1ce33a07e7943d48b079944c8d # v0.9 - run: ko build --bare --local --platform linux/amd64 --tags ci github.com/apricote/releaser-pleaser/cmd/rp - run: mkdir -p .github/actions/releaser-pleaser diff --git a/mise.toml b/mise.toml new file mode 100644 index 0000000..d520f6f --- /dev/null +++ b/mise.toml @@ -0,0 +1,10 @@ +[tools] +go = "1.25.0" +golangci-lint = "v2.4.0" +goreleaser = "v2.9.0" +"github:rust-lang/mdBook" = "v0.4.52" +"github:ko-build/ko" = "v0.18.0" + +[settings] +# Experimental features are needed for the Go backend +experimental = true