File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -938,6 +938,12 @@ jobs:
938938 - name : Download artifacts
939939 id : download-artifact
940940 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
941947
942948 - name : Create release
943949 id : create_release
@@ -956,15 +962,15 @@ jobs:
956962 const path = require('path');
957963 const fs = require('fs');
958964 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 ')) {
960966 if (path.extname(file) === '.zip') {
961967 console.log('uploadReleaseAsset', file);
962968 await github.repos.uploadReleaseAsset({
963969 owner: context.repo.owner,
964970 repo: context.repo.repo,
965971 release_id: release_id,
966972 name: file,
967- data: await fs.readFileSync(`./artifact/${file}`)
973+ data: await fs.readFileSync(`./artifact/release/ ${file}`)
968974 });
969975 }
970976 }
You can’t perform that action at this time.
0 commit comments