File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -233,18 +233,27 @@ jobs:
233
233
with :
234
234
path : artifacts/
235
235
236
- - name : Move all files to the same location
236
+ - name : Move artifacts to the expected location
237
237
run : |
238
- ls -R
239
- cd artifacts
240
- for i in */; do cp ${i}opendtu-onbattery-*.bin ./; done
238
+ ls -lR artifacts/
239
+ mkdir -p release-artifacts
240
+ for i in artifacts/*/; do
241
+ for file in ${i}opendtu-onbattery-*.bin; do
242
+ filename=$(basename "${file}")
243
+ tag_name=${GITHUB_REF#refs/tags/}
244
+ new_filename="${filename#opendtu-onbattery-}"
245
+ new_filename="opendtu-onbattery-${tag_name}-${new_filename}"
246
+ cp -v "${file}" "release-artifacts/${new_filename}"
247
+ done
248
+ done
249
+ ls -lR release-artifacts/
241
250
242
251
- name : Create release
243
252
uses : softprops/action-gh-release@v2
244
253
with :
245
254
body : ${{steps.github_release.outputs.changelog}}
246
255
draft : False
247
256
files : |
248
- artifacts/*.zip, artifacts/*.bin
257
+ release- artifacts/*.bin
249
258
env :
250
259
GITHUB_TOKEN : ${{ secrets.RELEASE_TOKEN }}
You can’t perform that action at this time.
0 commit comments