Skip to content

Commit

Permalink
Updated CICD
Browse files Browse the repository at this point in the history
  • Loading branch information
HarryHeres committed Oct 12, 2024
1 parent 2ac5531 commit f31a0b7
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/create-pre-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,24 +58,24 @@ jobs:
env:
version: ${{steps.get-app-version.outputs.version}}
release_id: ${{steps.create-pre-release.outputs.release_id}}
github_token: ${{ secrets.GITHUB_TOKEN }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs');
const path = require('path');
const version = process.env.version;
const release_id = process.env.release_id;
await github.rest.repos.uploadReleaseAsset({
const octokit = new Octokit({
auth: process.env.github_token
});
await octokit.request('POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}', {
owner: context.repo.owner,
repo: context.repo.repo,
release_id: `${release_id}`,
name: `SlicerBoneMorphing-${version}.zip`,
release_id: $release_id,
data: `@SlicerBoneMorphing-${version}.zip`,
name: `SlicerBoneMorphing-${version}.zip`,
label: "",
headers: {
'content-type': 'application/zip',
'X-GitHub-Api-Version': '2022-11-28'
}
});
console.log('Asset uploaded successfully.');

0 comments on commit f31a0b7

Please sign in to comment.