File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -938,6 +938,12 @@ jobs:
938
938
- name : Download artifacts
939
939
id : download-artifact
940
940
uses : actions/download-artifact@v4
941
+ with :
942
+ path : ./artifact
943
+
944
+ - name : Move artifacts
945
+ id : move_artifacts
946
+ run : mkdir -p ./artifact/release && mv ./artifact/*/*.zip ./artifact/release
941
947
942
948
- name : Create release
943
949
id : create_release
@@ -956,15 +962,15 @@ jobs:
956
962
const path = require('path');
957
963
const fs = require('fs');
958
964
const release_id = '${{ steps.create_release.outputs.id }}';
959
- for (let file of await fs.readdirSync('./artifact')) {
965
+ for (let file of await fs.readdirSync('./artifact/release ')) {
960
966
if (path.extname(file) === '.zip') {
961
967
console.log('uploadReleaseAsset', file);
962
968
await github.repos.uploadReleaseAsset({
963
969
owner: context.repo.owner,
964
970
repo: context.repo.repo,
965
971
release_id: release_id,
966
972
name: file,
967
- data: await fs.readFileSync(`./artifact/${file}`)
973
+ data: await fs.readFileSync(`./artifact/release/ ${file}`)
968
974
});
969
975
}
970
976
}
You can’t perform that action at this time.
0 commit comments