Skip to content

Commit eec5ba5

Browse files
committed
fix release workflow
1 parent 6231deb commit eec5ba5

File tree

1 file changed

+31
-4
lines changed

1 file changed

+31
-4
lines changed

.github/workflows/release.yml

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,23 @@ jobs:
4242
if: ${{ matrix.arch == 'x64' }}
4343
run: yarn electron:build:linux:x64
4444
- name: List out directory
45-
run: ls -la out/make
45+
run: ls -laR out/make
46+
# Rename AppImage to include architecture
47+
- name: Rename artifacts with architecture suffix
48+
run: |
49+
for f in out/make/AppImage/**/*.AppImage; do
50+
[ -f "$f" ] || continue
51+
dir=$(dirname "$f")
52+
base=$(basename "$f" .AppImage)
53+
mv "$f" "$dir/${base}-${{ matrix.arch }}.AppImage"
54+
done
4655
4756
# publish version release
4857
- name: Generate release body
4958
run: node scripts/release-body > release-body.txt
5059
- uses: ncipollo/release-action@v1
5160
with:
52-
artifacts: 'out/make/*.AppImage'
61+
artifacts: 'out/make/AppImage/**/*.AppImage'
5362
token: ${{ secrets.GITHUB_TOKEN }}
5463
replacesArtifacts: true
5564
omitBody: true
@@ -110,14 +119,30 @@ jobs:
110119
yarn electron:build:mac:x64
111120
fi
112121
- name: List out directory
113-
run: ls -la out/make
122+
run: ls -laR out/make
123+
# Rename artifacts to include architecture
124+
- name: Rename artifacts with architecture suffix
125+
run: |
126+
# Rename DMG
127+
for f in out/make/*.dmg; do
128+
[ -f "$f" ] || continue
129+
base=$(basename "$f" .dmg)
130+
mv "$f" "out/make/${base}-${{ matrix.arch }}.dmg"
131+
done
132+
# Rename ZIP
133+
for f in out/make/zip/**/*.zip; do
134+
[ -f "$f" ] || continue
135+
dir=$(dirname "$f")
136+
base=$(basename "$f" .zip)
137+
mv "$f" "$dir/${base}-${{ matrix.arch }}.zip"
138+
done
114139
115140
# publish version release
116141
- name: Generate release body
117142
run: node scripts/release-body > release-body.txt
118143
- uses: ncipollo/release-action@v1
119144
with:
120-
artifacts: 'out/make/*.dmg,out/make/*.zip'
145+
artifacts: 'out/make/*.dmg,out/make/zip/**/*.zip'
121146
token: ${{ secrets.GITHUB_TOKEN }}
122147
replacesArtifacts: true
123148
omitBody: true
@@ -213,6 +238,8 @@ jobs:
213238
finalize-release:
214239
runs-on: ubuntu-22.04
215240
needs: [linux, mac, windows, android]
241+
permissions:
242+
contents: write
216243
steps:
217244
- uses: actions/checkout@v2
218245
with:

0 commit comments

Comments
 (0)