mirror of
https://github.com/apricote/releaser-pleaser.git
synced 2026-02-07 10:17:02 +00:00
chore: use mise to install all tools in CI and locally
Makes sure that I have the same versions locally as CI
This commit is contained in:
parent
b3cb9e128c
commit
a2d888c31c
4 changed files with 19 additions and 26 deletions
19
.github/workflows/ci.yaml
vendored
19
.github/workflows/ci.yaml
vendored
|
|
@ -2,7 +2,7 @@ name: ci
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [ main ]
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
@ -12,15 +12,12 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
|
||||||
|
|
||||||
- name: Set up Go
|
- uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3
|
||||||
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
|
|
||||||
with:
|
|
||||||
go-version-file: go.mod
|
|
||||||
|
|
||||||
- name: Run golangci-lint
|
- name: Run golangci-lint
|
||||||
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8
|
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8
|
||||||
with:
|
with:
|
||||||
version: v2.4.0 # renovate: datasource=github-releases depName=golangci/golangci-lint
|
install-mode: none
|
||||||
args: --timeout 5m
|
args: --timeout 5m
|
||||||
|
|
||||||
test:
|
test:
|
||||||
|
|
@ -29,10 +26,7 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
|
||||||
|
|
||||||
- name: Set up Go
|
- uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3
|
||||||
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
|
|
||||||
with:
|
|
||||||
go-version-file: go.mod
|
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: go test -v -race -coverpkg=./... -coverprofile=coverage.txt ./...
|
run: go test -v -race -coverpkg=./... -coverprofile=coverage.txt ./...
|
||||||
|
|
@ -48,10 +42,7 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
|
||||||
|
|
||||||
- name: Set up Go
|
- uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3
|
||||||
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
|
|
||||||
with:
|
|
||||||
go-version-file: go.mod
|
|
||||||
|
|
||||||
- name: Run go mod tidy
|
- name: Run go mod tidy
|
||||||
run: go mod tidy
|
run: go mod tidy
|
||||||
|
|
|
||||||
6
.github/workflows/release.yaml
vendored
6
.github/workflows/release.yaml
vendored
|
|
@ -16,10 +16,6 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
|
||||||
|
|
||||||
- name: Set up Go
|
- uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3
|
||||||
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
|
|
||||||
with:
|
|
||||||
go-version-file: go.mod
|
|
||||||
|
|
||||||
- uses: ko-build/setup-ko@d006021bd0c28d1ce33a07e7943d48b079944c8d # v0.9
|
|
||||||
- run: ko build --bare --tags ${{ github.ref_name }} github.com/apricote/releaser-pleaser/cmd/rp
|
- run: ko build --bare --tags ${{ github.ref_name }} github.com/apricote/releaser-pleaser/cmd/rp
|
||||||
|
|
|
||||||
10
.github/workflows/releaser-pleaser.yaml
vendored
10
.github/workflows/releaser-pleaser.yaml
vendored
|
|
@ -2,7 +2,7 @@ name: releaser-pleaser
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [ main ]
|
||||||
# Using pull_request_target to avoid tainting the actual release PR with code from open feature pull requests
|
# Using pull_request_target to avoid tainting the actual release PR with code from open feature pull requests
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
types:
|
types:
|
||||||
|
|
@ -17,7 +17,7 @@ concurrency:
|
||||||
group: releaser-pleaser
|
group: releaser-pleaser
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions: {}
|
permissions: { }
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
releaser-pleaser:
|
releaser-pleaser:
|
||||||
|
|
@ -29,15 +29,11 @@ jobs:
|
||||||
with:
|
with:
|
||||||
ref: main
|
ref: main
|
||||||
|
|
||||||
- name: Set up Go
|
- uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3
|
||||||
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
|
|
||||||
with:
|
|
||||||
go-version-file: go.mod
|
|
||||||
|
|
||||||
# Build container image from current commit and replace image ref in `action.yml`
|
# 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
|
# 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.
|
# 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: ko build --bare --local --platform linux/amd64 --tags ci github.com/apricote/releaser-pleaser/cmd/rp
|
||||||
|
|
||||||
- run: mkdir -p .github/actions/releaser-pleaser
|
- run: mkdir -p .github/actions/releaser-pleaser
|
||||||
|
|
|
||||||
10
mise.toml
Normal file
10
mise.toml
Normal file
|
|
@ -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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue