Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hantmac authored and furykerry committed Nov 11, 2024
1 parent 7935dd5 commit 6193994
Showing 1 changed file with 26 additions and 9 deletions.
35 changes: 26 additions & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,31 +85,48 @@ jobs:
name: sha256sums-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}
path: ./_bin/sha256-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.txt
retention-days: 1
upload-sha256sums-plugin:
upload-sha256sums:
needs: build_and_upload
runs-on: ubuntu-latest
name: upload-sha256sums
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get release
id: get_release
uses: bruceadams/[email protected]
- name: Download sha256sums
uses: actions/download-artifact@v4.1.7
uses: actions/download-artifact@v4
with:
pattern: sha256sums-*
merge-multiple: true
path: sha256sums
- shell: bash
- name: Combine sha256sums
run: |
cat sha256sums/*.txt > sha256sums.txt
cat sha256-*.txt > sha256sums.txt
- name: Delete existing sha256sums
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const release = await github.rest.repos.getReleaseByTag({
owner: context.repo.owner,
repo: context.repo.repo,
tag: '${{ github.ref_name }}'
});
for (const asset of release.data.assets) {
if (asset.name === 'sha256sums.txt') {
await github.rest.repos.deleteReleaseAsset({
owner: context.repo.owner,
repo: context.repo.repo,
asset_id: asset.id
});
console.log('Deleted existing sha256sums.txt');
break;
}
}
- name: Upload Checksums
uses: actions/[email protected]
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: sha256sums.txt
asset_name: sha256sums-${{ steps.get_release.outputs.tag_name }}.txt
asset_name: sha256sums.txt
asset_content_type: text/plain
- name: Update kubectl plugin version in krew-index
uses: rajatjindal/[email protected]

0 comments on commit 6193994

Please sign in to comment.