Skip to content

Commit f289008

Browse files
committed
ci: update build workflow
1 parent 922176e commit f289008

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

.github/workflows/build-and-release.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,11 @@ jobs:
5555
run: pnpm run build:${{ matrix.platform }}
5656
env:
5757
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58-
TAG: ${{ github.ref_name || inputs.tag }}
5958

6059
- name: Upload artifacts
6160
uses: actions/upload-artifact@v4
6261
with:
63-
name: masscode-${{ matrix.platform }}-${{ env.TAG }}
62+
name: masscode-${{ matrix.platform }}-${{ github.ref_name || inputs.tag }}
6463
path: |
6564
dist/*.dmg
6665
dist/*.pkg
@@ -117,13 +116,12 @@ jobs:
117116
run: pnpm run build:sponsored:${{ matrix.platform }}
118117
env:
119118
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
120-
TAG: ${{ github.ref_name || inputs.tag }}
121119
VITE_SPONSORED: true
122120

123121
- name: Upload artifacts
124122
uses: actions/upload-artifact@v4
125123
with:
126-
name: sponsored-${{ matrix.platform }}-${{ env.TAG }}
124+
name: sponsored-${{ matrix.platform }}-${{ github.ref_name || inputs.tag }}
127125
path: |
128126
dist/*.dmg
129127
dist/*.pkg
@@ -153,7 +151,14 @@ jobs:
153151
path: artifacts
154152

155153
- name: Display structure of downloaded files
156-
run: ls -la artifacts/
154+
run: ls -lR artifacts/
155+
156+
- name: Prepare release files
157+
run: |
158+
mkdir -p release-files
159+
find artifacts/masscode-* -type f \( -name "massCode-*.dmg" -o -name "massCode-*.pkg" -o -name "massCode-*.exe" -o -name "massCode-*.msi" -o -name "massCode-*.AppImage" -o -name "massCode-*.snap" \) ! -name "*-sponsored.*" -exec cp {} release-files/ \;
160+
echo "Files prepared for release:"
161+
ls -lh release-files/
157162
158163
- name: Get package version
159164
id: package-version
@@ -164,13 +169,7 @@ jobs:
164169
id: create_release
165170
uses: softprops/action-gh-release@v2
166171
with:
167-
files: |
168-
artifacts/masscode-*/*.dmg
169-
artifacts/masscode-*/*.pkg
170-
artifacts/masscode-*/*.exe
171-
artifacts/masscode-*/*.msi
172-
artifacts/masscode-*/*.AppImage
173-
artifacts/masscode-*/*.snap
172+
files: release-files/*
174173
tag_name: ${{ github.ref_name || inputs.tag }}
175174
draft: true
176175
generate_release_notes: true

0 commit comments

Comments
 (0)