Skip to content

Commit cafa341

Browse files
hantmacfurykerry
authored andcommitted
fix
1 parent 6193994 commit cafa341

File tree

1 file changed

+9
-26
lines changed

1 file changed

+9
-26
lines changed

.github/workflows/release.yaml

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -88,45 +88,28 @@ jobs:
8888
upload-sha256sums:
8989
needs: build_and_upload
9090
runs-on: ubuntu-latest
91+
name: upload-sha256sums
9192
steps:
93+
- name: Checkout
94+
uses: actions/checkout@v4
9295
- name: Get release
9396
id: get_release
9497
uses: bruceadams/get-release@v1.2.2
95-
- name: Download sha256sums
96-
uses: actions/download-artifact@v4
98+
- name: Download artifacts
99+
uses: actions/download-artifact@v4.1.7
97100
with:
98101
pattern: sha256sums-*
99102
merge-multiple: true
100-
- name: Combine sha256sums
103+
path: sha256sums
104+
- shell: bash
101105
run: |
102-
cat sha256-*.txt > sha256sums.txt
103-
- name: Delete existing sha256sums
104-
uses: actions/github-script@v6
105-
with:
106-
github-token: ${{secrets.GITHUB_TOKEN}}
107-
script: |
108-
const release = await github.rest.repos.getReleaseByTag({
109-
owner: context.repo.owner,
110-
repo: context.repo.repo,
111-
tag: '${{ github.ref_name }}'
112-
});
113-
for (const asset of release.data.assets) {
114-
if (asset.name === 'sha256sums.txt') {
115-
await github.rest.repos.deleteReleaseAsset({
116-
owner: context.repo.owner,
117-
repo: context.repo.repo,
118-
asset_id: asset.id
119-
});
120-
console.log('Deleted existing sha256sums.txt');
121-
break;
122-
}
123-
}
106+
cat sha256sums/*.txt > sha256sums.txt
124107
- name: Upload Checksums
125108
uses: actions/upload-release-asset@v1.0.2
126109
with:
127110
upload_url: ${{ steps.get_release.outputs.upload_url }}
128111
asset_path: sha256sums.txt
129-
asset_name: sha256sums.txt
112+
asset_name: sha256sums-${{ steps.get_release.outputs.tag_name }}.txt
130113
asset_content_type: text/plain
131114
- name: Update kubectl plugin version in krew-index
132115
uses: rajatjindal/krew-release-bot@v0.0.43

0 commit comments

Comments
 (0)