Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cpoder authored Feb 6, 2023
1 parent 8deeeae commit f7a456c
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ jobs:
mvn --batch-mode --update-snapshots verify
- name: Create Release
uses: actions/github-script@v6
env:
RELEASE_ID: ${{needs.create_release.outputs.release_id}}
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
Expand All @@ -65,7 +67,7 @@ jobs:
console.log('Uploading ' + dir.name + '/target/' + file + ' as asset ' + dir.name);
await github.rest.repos.uploadReleaseAsset({
owner, repo,
release_id: context.needs.create_release.steps.create_release.outputs.id,
release_id: process.env.RELEASE_ID,
name: dir.name + '.zip',
data: await fs.readFile(dir.name + '/target/' + file)
});
Expand Down Expand Up @@ -93,12 +95,12 @@ jobs:
done
- name: Create Release
uses: actions/github-script@v6
env:
RELEASE_ID: ${{needs.create_release.outputs.release_id}}
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
console.log('environment', process.versions);
console.log({process});
console.log(context.needs);
const fs = require('fs').promises;
Expand All @@ -110,7 +112,7 @@ jobs:
console.log('Uploading ' + dir.name + '.zip as asset ' + dir.name);
await github.rest.repos.uploadReleaseAsset({
owner, repo,
release_id: context.needs.create_release.outputs.release_id,
release_id: process.env.RELEASE_ID,
name: dir.name + '.zip',
data: await fs.readFile('nodejs/' + dir.name + '/' + dir.name + '.zip')
});
Expand All @@ -133,6 +135,8 @@ jobs:
zip -r devicemanagement-lora *
- name: Create Release
uses: actions/github-script@v6
env:
RELEASE_ID: ${{needs.create_release.outputs.release_id}}
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
Expand All @@ -145,7 +149,7 @@ jobs:
await github.rest.repos.uploadReleaseAsset({
owner, repo,
release_id: context.needs.create_release.steps.create_release.outputs.id,
release_id: process.env.RELEASE_ID,
name: 'devicemanagement-lora.zip',
data: await fs.readFile('web/1014.0.172/devicemanagement-lora/dist/apps/devicemanagement-lora/devicemanagement-lora.zip')
});
Expand Down

0 comments on commit f7a456c

Please sign in to comment.