4 Commits

Author SHA1 Message Date
0611a9a1a0 fix: update target_commitish of release 2024-02-21 17:10:17 +08:00
69c9a2be62 Merge pull request #3 from watho/fix_error_on_delete_attachment
Fix error on delete attachment
2024-02-21 16:34:21 +08:00
91415bf0a8 build new dist 2024-02-15 14:36:47 +01:00
f6b3ef8321 fix wrong var name 2024-02-15 12:15:47 +01:00
2 changed files with 5 additions and 5 deletions

4
dist/index.js vendored
View File

@ -40967,7 +40967,7 @@ async function createOrGetRelease(client, owner, repo, body) {
name: body.name || release.name,
prerelease: body.prerelease !== undefined ? body.prerelease : release.prerelease,
tag_name: body.tag_name || release.tag_name,
target_commitish: body.target_commitish || release.target_commitish,
target_commitish: target_commitish,
}
})
return release
@ -41022,7 +41022,7 @@ async function uploadFiles(client, owner, repo, release_id, all_files) {
await client.repository.repoDeleteReleaseAttachment({
owner: owner,
repo: repo,
id: id,
id: release_id,
attachmentId: attachment.id,
})
console.log(`Successfully deleted old release attachment ${attachment.name}`)

View File

@ -5,7 +5,7 @@ import * as glob from "glob";
import core from "@actions/core";
import gitea from "gitea-api";
import path from 'path'
import path from 'path';
async function run() {
try {
@ -80,7 +80,7 @@ async function createOrGetRelease(client, owner, repo, body) {
name: body.name || release.name,
prerelease: body.prerelease !== undefined ? body.prerelease : release.prerelease,
tag_name: body.tag_name || release.tag_name,
target_commitish: body.target_commitish || release.target_commitish,
target_commitish: target_commitish,
}
})
return release
@ -135,7 +135,7 @@ async function uploadFiles(client, owner, repo, release_id, all_files) {
await client.repository.repoDeleteReleaseAttachment({
owner: owner,
repo: repo,
id: id,
id: release_id,
attachmentId: attachment.id,
})
console.log(`Successfully deleted old release attachment ${attachment.name}`)