43
43
echo "Building version: $VERSION"
44
44
45
45
- name : Cache Composer dependencies
46
- uses : actions/cache@v3
46
+ uses : actions/cache@v4
47
47
with :
48
48
path : vendor
49
49
key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -121,7 +121,7 @@ jobs:
121
121
php artisan native:build mac $NATIVEPHP_ARCH
122
122
123
123
- name : Upload artifacts
124
- uses : actions/upload-artifact@v3
124
+ uses : actions/upload-artifact@v4
125
125
with :
126
126
name : Clueless-${{ steps.version.outputs.VERSION }}-${{ matrix.arch }}
127
127
path : dist/*.dmg
@@ -144,31 +144,33 @@ jobs:
144
144
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
145
145
146
146
- name : Download x64 artifact
147
- uses : actions/download-artifact@v3
147
+ uses : actions/download-artifact@v4
148
148
with :
149
149
name : Clueless-${{ steps.version.outputs.VERSION }}-x64
150
150
path : ./artifacts/x64
151
151
152
152
- name : Download arm64 artifact
153
- uses : actions/download-artifact@v3
153
+ uses : actions/download-artifact@v4
154
154
with :
155
155
name : Clueless-${{ steps.version.outputs.VERSION }}-arm64
156
156
path : ./artifacts/arm64
157
157
158
- - name : Create Release
159
- id : create_release
160
- uses : actions/create-release@v1
158
+ - name : Upload Release Assets
161
159
env :
162
160
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
163
- with :
164
- tag_name : v${{ steps.version.outputs.VERSION }}
165
- release_name : Clueless v${{ steps.version.outputs.VERSION }}
166
- body : |
167
- ## 🎉 Clueless v${{ steps.version.outputs.VERSION }}
161
+ run : |
162
+ # Find the existing release for v${{ steps.version.outputs.VERSION }}
163
+ RELEASE_ID=$(gh api repos/${{ github.repository }}/releases/tags/v${{ steps.version.outputs.VERSION }} --jq '.id' || echo "")
164
+
165
+ if [ -z "$RELEASE_ID" ]; then
166
+ # Create a new release if it doesn't exist
167
+ gh release create v${{ steps.version.outputs.VERSION }} \
168
+ --title "Clueless v${{ steps.version.outputs.VERSION }}" \
169
+ --notes "## 🎉 Clueless v${{ steps.version.outputs.VERSION }}
168
170
169
171
### Downloads
170
- - 🖥️ **macOS (Apple Silicon)**: `Clueless-${{ steps.version.outputs.VERSION }}-arm64.dmg`
171
- - 🖥️ **macOS (Intel)**: `Clueless-${{ steps.version.outputs.VERSION }}-x64.dmg`
172
+ - 🖥️ **macOS (Apple Silicon)**: \ `Clueless-${{ steps.version.outputs.VERSION }}-arm64.dmg\ `
173
+ - 🖥️ **macOS (Intel)**: \ `Clueless-${{ steps.version.outputs.VERSION }}-x64.dmg\ `
172
174
173
175
### Installation
174
176
1. Download the appropriate DMG file for your Mac
@@ -177,26 +179,12 @@ jobs:
177
179
4. Launch Clueless from Applications
178
180
179
181
### What's New
180
- See [commits](https://github.com/${{ github.repository }}/commits/v${{ steps.version.outputs.VERSION }}) for details.
181
- draft : true
182
- prerelease : false
183
-
184
- - name : Upload x64 DMG
185
- uses : actions/upload-release-asset@v1
186
- env :
187
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
188
- with :
189
- upload_url : ${{ steps.create_release.outputs.upload_url }}
190
- asset_path : ./artifacts/x64/Clueless-${{ steps.version.outputs.VERSION }}-x64.dmg
191
- asset_name : Clueless-${{ steps.version.outputs.VERSION }}-x64.dmg
192
- asset_content_type : application/x-apple-diskimage
193
-
194
- - name : Upload arm64 DMG
195
- uses : actions/upload-release-asset@v1
196
- env :
197
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
198
- with :
199
- upload_url : ${{ steps.create_release.outputs.upload_url }}
200
- asset_path : ./artifacts/arm64/Clueless-${{ steps.version.outputs.VERSION }}-arm64.dmg
201
- asset_name : Clueless-${{ steps.version.outputs.VERSION }}-arm64.dmg
202
- asset_content_type : application/x-apple-diskimage
182
+ See [commits](https://github.com/${{ github.repository }}/commits/v${{ steps.version.outputs.VERSION }}) for details." \
183
+ --draft
184
+ fi
185
+
186
+ # Upload the artifacts
187
+ gh release upload v${{ steps.version.outputs.VERSION }} \
188
+ ./artifacts/x64/Clueless-${{ steps.version.outputs.VERSION }}-x64.dmg \
189
+ ./artifacts/arm64/Clueless-${{ steps.version.outputs.VERSION }}-arm64.dmg \
190
+ --clobber
0 commit comments