Skip to content

Commit 0b209d3

Browse files
Update build-release.yml
1 parent 1042737 commit 0b209d3

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

.github/workflows/build-release.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# .github/workflows/build-release.yml
22
name: Build Release
33

4+
permissions:
5+
contents: write
6+
47
on:
58
release:
69
types: [published]
@@ -67,16 +70,22 @@ jobs:
6770
with:
6871
name: fancyfetch-${{runner.os}}
6972
path: |
70-
fancyfetch-*.tar.gz
71-
fancyfetch-*.zip
73+
./fancyfetch-*.tar.gz
74+
./fancyfetch-*.zip
7275
retention-days: 30
7376

74-
- name: Upload to release (on release only)
75-
if: github.event_name == 'release'
77+
- name: Upload to release (Linux/Mac)
78+
if: github.event_name == 'release' && runner.os != 'Windows'
79+
uses: softprops/action-gh-release@v1
80+
with:
81+
files: ./fancyfetch-*.tar.gz
82+
env:
83+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
84+
85+
- name: Upload to release (Windows)
86+
if: github.event_name == 'release' && runner.os == 'Windows'
7687
uses: softprops/action-gh-release@v1
7788
with:
78-
files: |
79-
fancyfetch-*.tar.gz
80-
fancyfetch-*.zip
89+
files: ./fancyfetch-*.zip
8190
env:
8291
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)