mirror of
https://github.com/ahmetb/kubectx.git
synced 2025-07-09 13:23:02 +00:00
fix some ci enhancement (#435)
* fix(release): customize goreleaser config file, by adding json schema and fixing configuration version * fix(go): rename invalid comment format * fix(ci): made release workflow work again replace goreleaser --rm-dist flag by --clean increment go version for release pipeline fetch previous tags use by goreleaser give release workflow content write permissions to publish release
This commit is contained in:
parent
561793c356
commit
0bcd0d5dd5
7
.github/workflows/release.yml
vendored
7
.github/workflows/release.yml
vendored
@ -19,14 +19,17 @@ on:
|
|||||||
- 'v*.*.*'
|
- 'v*.*.*'
|
||||||
jobs:
|
jobs:
|
||||||
goreleaser:
|
goreleaser:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@master
|
uses: actions/checkout@master
|
||||||
|
- run: git fetch --tags
|
||||||
- name: Setup Go
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: '1.20'
|
go-version: '1.22'
|
||||||
- name: Install Snapcraft
|
- name: Install Snapcraft
|
||||||
uses: samuelmeuli/action-snapcraft@v1
|
uses: samuelmeuli/action-snapcraft@v1
|
||||||
- name: Setup Snapcraft
|
- name: Setup Snapcraft
|
||||||
@ -38,7 +41,7 @@ jobs:
|
|||||||
uses: goreleaser/goreleaser-action@v2
|
uses: goreleaser/goreleaser-action@v2
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: latest
|
||||||
args: release --rm-dist
|
args: release --clean
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Update new version for plugin 'ctx' in krew-index
|
- name: Update new version for plugin 'ctx' in krew-index
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
|
||||||
|
|
||||||
# Copyright 2021 Google LLC
|
# Copyright 2021 Google LLC
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -14,6 +16,8 @@
|
|||||||
|
|
||||||
# This is an example goreleaser.yaml file with some sane defaults.
|
# This is an example goreleaser.yaml file with some sane defaults.
|
||||||
# Make sure to check the documentation at http://goreleaser.com
|
# Make sure to check the documentation at http://goreleaser.com
|
||||||
|
|
||||||
|
version: 2
|
||||||
before:
|
before:
|
||||||
hooks:
|
hooks:
|
||||||
- go mod download
|
- go mod download
|
||||||
|
@ -11,7 +11,7 @@ var (
|
|||||||
version = "v0.0.0+unknown" // populated by goreleaser
|
version = "v0.0.0+unknown" // populated by goreleaser
|
||||||
)
|
)
|
||||||
|
|
||||||
// VersionOps describes printing version string.
|
// VersionOp describes printing version string.
|
||||||
type VersionOp struct{}
|
type VersionOp struct{}
|
||||||
|
|
||||||
func (_ VersionOp) Run(stdout, _ io.Writer) error {
|
func (_ VersionOp) Run(stdout, _ io.Writer) error {
|
||||||
|
@ -11,7 +11,7 @@ var (
|
|||||||
version = "v0.0.0+unknown" // populated by goreleaser
|
version = "v0.0.0+unknown" // populated by goreleaser
|
||||||
)
|
)
|
||||||
|
|
||||||
// VersionOps describes printing version string.
|
// VersionOp describes printing version string.
|
||||||
type VersionOp struct{}
|
type VersionOp struct{}
|
||||||
|
|
||||||
func (_ VersionOp) Run(stdout, _ io.Writer) error {
|
func (_ VersionOp) Run(stdout, _ io.Writer) error {
|
||||||
|
2
internal/env/constants.go
vendored
2
internal/env/constants.go
vendored
@ -19,7 +19,7 @@ const (
|
|||||||
// interactive context selection when fzf is installed.
|
// interactive context selection when fzf is installed.
|
||||||
EnvFZFIgnore = "KUBECTX_IGNORE_FZF"
|
EnvFZFIgnore = "KUBECTX_IGNORE_FZF"
|
||||||
|
|
||||||
// EnvForceColor describes the environment variable to disable color usage
|
// EnvNoColor describes the environment variable to disable color usage
|
||||||
// when printing current context in a list.
|
// when printing current context in a list.
|
||||||
EnvNoColor = `NO_COLOR`
|
EnvNoColor = `NO_COLOR`
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user