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 6193994 commit cafa341
Showing 1 changed file with 9 additions and 26 deletions.
35 changes: 9 additions & 26 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,45 +88,28 @@ jobs:
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
- name: Download artifacts
uses: actions/download-artifact@v4.1.7
with:
pattern: sha256sums-*
merge-multiple: true
- name: Combine sha256sums
path: sha256sums
- shell: bash
run: |
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;
}
}
cat sha256sums/*.txt > sha256sums.txt
- name: Upload Checksums
uses: actions/[email protected]
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: sha256sums.txt
asset_name: sha256sums.txt
asset_name: sha256sums-${{ steps.get_release.outputs.tag_name }}.txt
asset_content_type: text/plain
- name: Update kubectl plugin version in krew-index
uses: rajatjindal/[email protected]

0 comments on commit cafa341

Please sign in to comment.