Compare commits

..

No commits in common. "master" and "2.7.0" have entirely different histories.

7 changed files with 7518 additions and 28958 deletions

View File

@ -1,12 +1,5 @@
# Changelog
## [2.9.0] - 2024-02-22
- Allow seeting a release as draft [#112](https://github.com/svenstaro/upload-release-action/pull/112) (thanks @ShonP40)
## [2.8.0] - 2024-02-21
- Bump all deps
- Update to node 20
## [2.7.0] - 2023-07-28
- Allow setting an explicit target_commitish [#46](https://github.com/svenstaro/upload-release-action/pull/46) (thanks @Spikatrix)

View File

@ -18,7 +18,6 @@ Optional Arguments
- `file_glob`: If set to true, the `file` argument can be a glob pattern (`asset_name` is ignored in this case) (Default: `false`)
- `overwrite`: If an asset with the same name already exists, overwrite it (Default: `false`).
- `promote`: If a prerelease already exists, promote it to a release (Default: `false`).
- `draft`: Sets the release as a draft instead of publishing it, allowing you to make any edits needed before releasing (Default: `false`).
- `prerelease`: Mark the release as a pre-release (Default: `false`).
- `make_latest`: Mark the release as the latest release for the repository (Default: `true`).
- `release_name`: Explicitly set a release name. (Defaults: implicitly same as `tag` via GitHub API).

View File

@ -24,8 +24,6 @@ inputs:
description: 'Promote a prerelease to release. Defaults to "false".'
file_glob:
description: 'If true the file can be a glob pattern, asset_name is ignored if this is true.'
draft:
description: 'Mark the release as a draft. Defaults to "false".'
prerelease:
description: 'Mark the release as a pre-release. Defaults to "false".'
make_latest:
@ -42,5 +40,5 @@ outputs:
browser_download_url:
description: 'The publicly available URL of the asset.'
runs:
using: 'node20'
using: 'node16'
main: 'dist/index.js'

32808
dist/index.js vendored

File diff suppressed because one or more lines are too long

3630
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "upload-release-action",
"version": "2.9.0",
"version": "2.7.0",
"private": true,
"description": "Upload files to a GitHub release",
"main": "lib/main.js",
@ -27,26 +27,26 @@
"author": "Sven-Hendrik Haase",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.10.1",
"@actions/github": "^6.0.0",
"@actions/core": "^1.10.0",
"@actions/github": "^5.1.1",
"@lifeomic/attempt": "^3.0.3",
"@octokit/core": "^5.1.0",
"@octokit/core": "^4.2.1",
"glob": "^10"
},
"devDependencies": {
"@octokit/types": "^12.5.0",
"@octokit/types": "^9.2.3",
"@types/glob": "^8",
"@types/jest": "^29",
"@types/node": "^20",
"@typescript-eslint/eslint-plugin": "^7.0.2",
"@typescript-eslint/parser": "^7",
"@vercel/ncc": "^0.38.1",
"@types/node": "^16",
"@typescript-eslint/parser": "^6",
"@vercel/ncc": "^0.36.1",
"eslint": "^8",
"eslint-plugin-github": "^4.10",
"eslint-plugin-github": "^4.9",
"eslint-plugin-jest": "^27",
"jest": "^29",
"jest-circus": "^29",
"js-yaml": "^4",
"prettier": "^3.2",
"prettier": "^3.0",
"ts-jest": "^29",
"typescript": "^5"
}

View File

@ -28,7 +28,6 @@ type UpdateReleaseParams = Endpoints[typeof updateRelease]['parameters']
async function get_release_by_tag(
tag: string,
draft: boolean,
prerelease: boolean,
make_latest: boolean,
release_name: string,
@ -69,7 +68,6 @@ async function get_release_by_tag(
return await octokit.request(createRelease, {
...repo(),
tag_name: tag,
draft: draft,
prerelease: prerelease,
make_latest: make_latest ? 'true' : 'false',
name: release_name,
@ -211,7 +209,6 @@ async function run(): Promise<void> {
const file_glob = core.getInput('file_glob') == 'true' ? true : false
const overwrite = core.getInput('overwrite') == 'true' ? true : false
const promote = core.getInput('promote') == 'true' ? true : false
const draft = core.getInput('draft') == 'true' ? true : false
const prerelease = core.getInput('prerelease') == 'true' ? true : false
const make_latest = core.getInput('make_latest') != 'false' ? true : false
const release_name = core.getInput('release_name')
@ -225,7 +222,6 @@ async function run(): Promise<void> {
const octokit = github.getOctokit(token)
const release = await get_release_by_tag(
tag,
draft,
prerelease,
make_latest,
release_name,