Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
name: golangci-lint
name: lint
on:
push:
branches:
- main
pull_request:

permissions:
contents: read
# Optional: allow read access to pull requests. Use with `only-new-issues` option.
# pull-requests: read

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: stable
go-version: 1.25
cache: true

- name: golangci-lint
uses: golangci/golangci-lint-action@v8
uses: golangci/golangci-lint-action@v9
with:
version: v2.1
version: v2.11

- name: govulncheck
run: go run golang.org/x/vuln/cmd/govulncheck@latest ./...
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: release

on:
push:
tags:
- "v1.12.*"

# Prevent concurrent releases
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false

permissions: {}

jobs:
gorelease:
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: write # Needed for GoReleaser to create releases
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0

- uses: actions/setup-go@v6
with:
go-version: 1.25
cache: true

- name: fetch default stable for Kubernetes
run: |
echo "DEFAULT_STABLE=$(curl -SsL $(cat hack/stable-kubernetes-url.txt))" >> "$GITHUB_ENV"

- name: GoReleaser run
uses: goreleaser/goreleaser-action@v7
with:
distribution: goreleaser
version: "~> v2"
args: release --clean --parallelism 1 --fail-fast
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: 2
project_name: kubeone
builds:
- ldflags:
Expand All @@ -10,7 +11,6 @@ builds:
- "-X k8c.io/kubeone/pkg/cmd.date={{.Date}}"
env:
- "CGO_ENABLED=0"
- "GO111MODULE=on"
- "GOFLAGS=-mod=readonly -trimpath"
goos:
- linux
Expand All @@ -20,7 +20,7 @@ builds:
- arm64
archives:
- id: kubeone
format: zip
formats: ["zip"]
files:
- README.md
- LICENSE
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export CGO_ENABLED=0
export GOPROXY?=https://proxy.golang.org
export GO111MODULE=on
export GOFLAGS?=-mod=readonly -trimpath
export DEFAULT_STABLE=$(shell curl -SsL https://dl.k8s.io/release/stable-1.34.txt)
export DEFAULT_STABLE=$(shell curl -SsL $(shell cat hack/stable-kubernetes-url.txt))

BUILD_DATE=$(shell if hash gdate 2>/dev/null; then gdate --rfc-3339=seconds | sed 's/ /T/'; else date --rfc-3339=seconds | sed 's/ /T/'; fi)
GITCOMMIT=$(shell git log -1 --pretty=format:"%H")
Expand Down
1 change: 1 addition & 0 deletions hack/stable-kubernetes-url.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://dl.k8s.io/release/stable-1.34.txt
Loading