From 9c25ca8056caaec2f4413150eefd5e4fec4c8c95 Mon Sep 17 00:00:00 2001 From: pabateman Date: Mon, 10 Jun 2024 16:57:43 +0700 Subject: [PATCH 1/3] Intermediate fix --- .github/workflows/build-by-commit.yml | 7 ++----- .github/workflows/build-by-tag.yml | 25 ++++++------------------- 2 files changed, 8 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build-by-commit.yml b/.github/workflows/build-by-commit.yml index d19b34e..4a1d706 100644 --- a/.github/workflows/build-by-commit.yml +++ b/.github/workflows/build-by-commit.yml @@ -17,16 +17,13 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: '1.20' - - name: Check out code into the Go module directory - uses: actions/checkout@v2 - - name: Verify go.mod is sane run: go mod tidy && git diff --no-patch --exit-code diff --git a/.github/workflows/build-by-tag.yml b/.github/workflows/build-by-tag.yml index d1564a2..960cac0 100644 --- a/.github/workflows/build-by-tag.yml +++ b/.github/workflows/build-by-tag.yml @@ -13,21 +13,18 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: '1.20' - - name: Check out code into the Go module directory - uses: actions/checkout@v2 - - 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@v3.7.0 + uses: golangci/golangci-lint-action@v6.0.1 with: args: --timeout=3m @@ -45,26 +42,16 @@ jobs: hack/install-gox.sh make deploy - - name: Create release + - name: Create Release id: create_release - uses: actions/create-release@v1 + uses: softprops/action-gh-release@v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ github.ref }} release_name: Release ${{ github.ref }} draft: false prerelease: false - - - name: Upload binaries to release - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - # hacky glob pattern because this does not accept multiple patterns - file: out/kubectl-nsenter-*.* - tag: ${{ github.ref }} - overwrite: true - file_glob: true + files: out/kubectl-nsenter-*.* - name: Update new version in krew-index uses: rajatjindal/krew-release-bot@v0.0.46 From 1cbc13377a488a9c1deb335aafe4e47568d7264c Mon Sep 17 00:00:00 2001 From: pabateman Date: Mon, 10 Jun 2024 17:50:12 +0700 Subject: [PATCH 2/3] Update actions triggers --- .github/workflows/build-by-commit.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-by-commit.yml b/.github/workflows/build-by-commit.yml index b2675a8..350c850 100644 --- a/.github/workflows/build-by-commit.yml +++ b/.github/workflows/build-by-commit.yml @@ -3,12 +3,11 @@ name: build by commit on: push: branches: - - master - - 'feature/**' + - '*' pull_request: branches: - - master + - '*' env: ARTIFACT_VERSION: ${{ github.ref_name }} From 2dc565dfab6598335db9f698da097d81a5e12d2e Mon Sep 17 00:00:00 2001 From: pabateman Date: Mon, 10 Jun 2024 17:51:46 +0700 Subject: [PATCH 3/3] Update go version for tag builds --- .github/workflows/build-by-tag.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-by-tag.yml b/.github/workflows/build-by-tag.yml index 960cac0..9845b9e 100644 --- a/.github/workflows/build-by-tag.yml +++ b/.github/workflows/build-by-tag.yml @@ -18,7 +18,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: '1.20' + go-version: '1.22.4' - name: Verify go.mod is sane run: go mod tidy && git diff --no-patch --exit-code