Skip to content

Commit a1611bd

Browse files
committed
chore: update release action
1 parent bef6e54 commit a1611bd

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

.github/workflows/common_build_upload.yml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,25 @@ jobs:
143143
path: ./release
144144
type: tar
145145

146+
- name: Rename bin file
147+
if: startsWith(github.ref, 'refs/tags/')
148+
run: |
149+
cp ./${{steps.vars.outputs.artifact_name}} ./${{steps.vars.outputs.repo_name}}_${{steps.vars.outputs.tag}}_linux_amd64.tar.gz
150+
151+
- name: shasum
152+
if: startsWith(github.ref, 'refs/tags/')
153+
run: shasum -a 256 ./${{steps.vars.outputs.repo_name}}_${{steps.vars.outputs.tag}}_linux_amd64.tar.gz > ./${{steps.vars.outputs.repo_name}}_${{steps.vars.outputs.tag}}_linux_amd64_linux_amd64.sha256
154+
shell: bash
155+
156+
- name: Release
157+
uses: softprops/action-gh-release@v1
158+
if: startsWith(github.ref, 'refs/tags/')
159+
continue-on-error: true
160+
with:
161+
files: |
162+
./${{steps.vars.outputs.repo_name}}_${{steps.vars.outputs.tag}}_linux_amd64.tar.gz
163+
./${{steps.vars.outputs.repo_name}}_${{steps.vars.outputs.tag}}_linux_amd64_linux_amd64.sha256
164+
146165
- name: upload artifacts
147166
uses: actions/upload-artifact@v2
148167
if: ${{ steps.vars.outputs.pub_method == 'pushRelease' }}
@@ -151,17 +170,6 @@ jobs:
151170
path: ./${{steps.vars.outputs.artifact_name}}
152171
if-no-files-found: error
153172

154-
- name: release
155-
id: release
156-
uses: ncipollo/release-action@v1
157-
if: ${{ steps.vars.outputs.pub_method=='pushRelease' }}
158-
continue-on-error: true
159-
with:
160-
artifacts: ${{steps.vars.outputs.artifact_name}}
161-
tag: ${{ steps.vars.outputs.github_tag }}
162-
commit: ${{ steps.vars.outputs.commit }}
163-
token: ${{ secrets.token }}
164-
165173
- name: upload ftp
166174
id: uploadftp
167175
if: ${{ steps.vars.outputs.ftp_exists == '1' }}

0 commit comments

Comments
 (0)