-
Notifications
You must be signed in to change notification settings - Fork 4
58 lines (46 loc) · 1.18 KB
/
build-by-tag.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: build by tag
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
env:
ARTIFACT_VERSION: ${{ github.ref_name }}
GO111MODULE: 'on'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22.4'
- name: Verify go.mod is sane
run: go mod tidy && git diff --no-patch --exit-code
- name: Run code lint
uses: golangci/golangci-lint-action@v6.0.1
with:
args: --timeout=3m
- name: Install dependencies
run: go mod download
- name: Verify build
run: make dev
- name: Make binaries
run: |
set -euo pipefail
sudo apt update
sudo apt install -y upx
hack/install-gox.sh
make deploy
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
files: out/kubectl-nsenter-*.*
# - name: Update new version in krew-index
# uses: rajatjindal/krew-release-bot@v0.0.46