Skip to content

Commit 96decbe

Browse files
committed
simplify logic: upload to release from each job
1 parent 3d6309a commit 96decbe

File tree

1 file changed

+5
-22
lines changed

1 file changed

+5
-22
lines changed

.github/workflows/release.yml

+5-22
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
shell: "bash"
1919
- os: "windows-2022"
2020
shell: "msys2 {0}"
21+
permissions:
22+
contents: write
2123
defaults:
2224
run:
2325
shell: ${{ matrix.shell }}
@@ -26,31 +28,12 @@ jobs:
2628
- uses: actions/checkout@v4
2729
- name: Build script
2830
run: ./build.sh
29-
- uses: actions/upload-artifact@v4
30-
with:
31-
name: artifacts-${{ matrix.os }}
32-
path: ./artefacts/*
33-
retention-days: 3
34-
35-
release:
36-
name: Upload Binaries to GitHub Release
37-
needs: [build]
38-
runs-on: ubuntu-latest
39-
permissions:
40-
contents: write
41-
# upload binaries to github release if commit is tagged
42-
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
43-
steps:
44-
- uses: actions/download-artifact@v4
45-
with:
46-
pattern: artifacts-*
47-
merge-multiple: true
48-
path: binaries
49-
- name: Upload binaries to release
31+
- name: Upload binaries to release if commit is tagged
32+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
5033
uses: svenstaro/upload-release-action@v2
5134
with:
5235
repo_token: ${{ secrets.GITHUB_TOKEN }}
53-
file: binaries/*
36+
file: ./artefacts/*
5437
tag: ${{ github.ref }}
5538
overwrite: true
5639
file_glob: true

0 commit comments

Comments
 (0)