Skip to content

Commit 78490e1

Browse files
authored
Merge pull request #3 from SwissLife-OSS/upload-release-assets
Use gh to upload release assets
2 parents 579b8d3 + 51d0c13 commit 78490e1

File tree

1 file changed

+18
-20
lines changed

1 file changed

+18
-20
lines changed

.github/workflows/release.yml

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
name: release
44

55
on:
6-
push:
7-
tags:
8-
- 'v[0-9]+.[0-9]+.[0-9]+'
6+
release:
7+
types:
8+
- published
99
workflow_dispatch:
1010

11+
permissions:
12+
contents: write
13+
1114
jobs:
1215
release:
1316
name: Release ec_check
@@ -28,20 +31,15 @@ jobs:
2831
run: |
2932
make build
3033
31-
- name: Upload for Linux
32-
uses: actions/upload-artifact@v4
33-
with:
34-
name: Linux
35-
path: bin/*linux*
36-
37-
- name: Upload for MacOS
38-
uses: actions/upload-artifact@v4
39-
with:
40-
name: macos
41-
path: bin/*macos*
42-
43-
- name: Upload for Windows
44-
uses: actions/upload-artifact@v4
45-
with:
46-
name: Windows
47-
path: bin/*windows*
34+
- name: Upload release assets
35+
run: |
36+
cd ${{github.workspace}}
37+
gh release upload ${{github.event.release.tag_name}} ./bin/ec_check.linux.amd64
38+
gh release upload ${{github.event.release.tag_name}} ./bin/ec_check.linux.arm64
39+
gh release upload ${{github.event.release.tag_name}} ./bin/ec_check.macos.amd64
40+
gh release upload ${{github.event.release.tag_name}} ./bin/ec_check.macos.arm64
41+
gh release upload ${{github.event.release.tag_name}} ./bin/ec_check.windows.amd64.exe
42+
gh release upload ${{github.event.release.tag_name}} ./bin/ec_check.windows.arm64.exe
43+
env:
44+
GITHUB_TOKEN: ${{ github.TOKEN }}
45+
shell: bash

0 commit comments

Comments
 (0)