From 98ff45bf6bd77fa155740d2f8e63992f413f9a4a Mon Sep 17 00:00:00 2001 From: bedirhangull Date: Tue, 17 Dec 2024 15:19:38 +0300 Subject: [PATCH] sh update also release update --- .github/workflows/release.yml | 38 +++++++++++++++++++++++------------ scripts/update-krew-yaml.sh | 0 2 files changed, 25 insertions(+), 13 deletions(-) mode change 100755 => 100644 scripts/update-krew-yaml.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a3dc46d..78a5b4d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,27 +14,39 @@ jobs: uses: actions/checkout@master with: fetch-depth: 0 + - name: Setup Go uses: actions/setup-go@v1 with: - go-version: 1.20 + go-version: '1.20' + + - name: Ensure script is executable + run: | + chmod +x scripts/update-krew-yaml.sh + ls -l scripts/update-krew-yaml.sh + - name: GoReleaser - uses: goreleaser/goreleaser-action@v1 + uses: goreleaser/goreleaser-action@v4 with: + distribution: goreleaser version: latest - args: release + args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Grant execute permission to update-krew-yaml.sh - run: chmod +x scripts/update-krew-yaml.sh - - name: Update krew.yaml - run: ./scripts/update-krew-yaml.sh - - name: Commit and push updated krew.yaml + + - name: Run update script + run: | + pwd + ls -l scripts/ + ./scripts/update-krew-yaml.sh + + - name: Commit and push updated Krew manifest run: | - git config user.name github-actions - git config user.email github-actions@github.com - git add krew.yaml - git commit -m "Update krew.yaml for release ${{ github.ref }}" - git push + git config user.name github-actions + git config user.email github-actions@github.com + git add deploy/krew/plugin.yaml + git commit -m "Update Krew manifest for release ${GITHUB_REF#refs/tags/}" + git push + - name: Update new version in krew-index uses: rajatjindal/krew-release-bot@v0.0.38 \ No newline at end of file diff --git a/scripts/update-krew-yaml.sh b/scripts/update-krew-yaml.sh old mode 100755 new mode 100644