Skip to content

Commit

Permalink
update index.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Puyodead1 committed Feb 28, 2024
1 parent 69cfd1e commit d4ebd57
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 23 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

23 changes: 1 addition & 22 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { existsSync } from 'fs';
import { basename, dirname, resolve } from 'path';

import * as core from '@actions/core';
import { context, getOctokit } from '@actions/github';
import { context } from '@actions/github';
import stringArgv from 'string-argv';

import { buildProject } from './build';
Expand Down Expand Up @@ -220,27 +220,6 @@ async function run(): Promise<void> {
}
}

// delete old release assets
const github = getOctokit(process.env.GITHUB_TOKEN);

const existingAssets = (
await github.rest.repos.listReleaseAssets({
owner: owner,
repo: repo,
release_id: releaseId,
per_page: 50,
})
).data;

for (const asset of existingAssets) {
console.log(`Deleting existing ${asset.name}...`);
await github.rest.repos.deleteReleaseAsset({
owner: owner,
repo: repo,
asset_id: asset.id,
});
}

await uploadReleaseAssets(owner, repo, releaseId, artifacts);

if (includeUpdaterJson) {
Expand Down

0 comments on commit d4ebd57

Please sign in to comment.