Skip to content

Commit

Permalink
Testing with an actual release.
Browse files Browse the repository at this point in the history
  • Loading branch information
PathogenDavid committed Dec 18, 2021
1 parent 503ae5d commit b3aae0f
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/upload-release-assets-mochi-physx.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Upload release assets Mochi.PhysX test
on: [push, workflow_dispatch]
on: [release]
jobs:
publish-release-assets:
name: Publish Release Assets
runs-on: ubuntu-latest
#needs: build-mochi-physx
#if: github.event_name == 'release'
if: github.event_name == 'release'
steps:
# ----------------------------------------------------------------------- Download all artifacts
- name: Download artifacts
Expand All @@ -22,11 +22,11 @@ jobs:
script: |
const fs = require('fs').promises;
const path = require('path');
//const uploadUrl = context.payload.release.upload_url;
//
//if (!uploadUrl) {
// throw "Missing release asset upload URL!";
//}
const uploadUrl = context.payload.release.upload_url;
if (!uploadUrl) {
throw "Missing release asset upload URL!";
}
async function uploadAssets(directoryPath) {
for (let filePath of await fs.readdir(directoryPath)) {
Expand All @@ -40,15 +40,15 @@ jobs:
}
console.log(`Uploading '${filePath}'`);
//await github.repos.uploadReleaseAsset({
// url: uploadUrl,
// headers: {
// 'content-type': 'application/octet-stream',
// 'content-length': stats.size
// },
// name: path.basename(filePath),
// data: await fs.readFile(filePath)
//});
await github.repos.uploadReleaseAsset({
url: uploadUrl,
headers: {
'content-type': 'application/octet-stream',
'content-length': stats.size
},
name: path.basename(filePath),
data: await fs.readFile(filePath)
});
}
}
Expand Down

0 comments on commit b3aae0f

Please sign in to comment.