Compare commits

...

17 Commits

Author SHA1 Message Date
Sven-Hendrik Haase
84f3aed823
Merge pull request #125 from svenstaro/dependabot/npm_and_yarn/braces-3.0.3
Bump braces from 3.0.2 to 3.0.3
2024-07-07 03:16:11 +02:00
dependabot[bot]
f9770cdf31
Bump braces from 3.0.2 to 3.0.3
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-16 09:58:52 +00:00
Sven-Hendrik Haase
1b2bf5c959
Merge pull request #123 from svenstaro/dependabot/npm_and_yarn/undici-5.28.4
Bump undici from 5.28.3 to 5.28.4
2024-04-05 03:13:44 +02:00
dependabot[bot]
265508bc9f
Bump undici from 5.28.3 to 5.28.4
Bumps [undici](https://github.com/nodejs/undici) from 5.28.3 to 5.28.4.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.28.3...v5.28.4)

---
updated-dependencies:
- dependency-name: undici
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-04 17:24:09 +00:00
Sven-Hendrik Haase
04733e069f
This is 2.9.0 2024-02-21 22:43:46 +01:00
Sven-Hendrik Haase
7b5b755e5b
Add CHANGELOG entry for #112 2024-02-21 22:40:15 +01:00
Sven-Hendrik Haase
17449a21ea
Add draft release support (fixes #19) 2024-02-21 22:38:32 +01:00
Sven-Hendrik Haase
ec2ff03a5a
Amend CHANGELOG 2024-02-21 22:32:30 +01:00
Sven-Hendrik Haase
ff23fb2574
This is 2.8.0 2024-02-21 22:30:30 +01:00
Sven-Hendrik Haase
8e438350b0
Bump all deps 2024-02-21 22:28:50 +01:00
Sven-Hendrik Haase
fe68892921
Merge pull request #113 from svenstaro/dependabot/npm_and_yarn/babel/traverse-7.23.2
Bump @babel/traverse from 7.22.8 to 7.23.2
2023-11-22 17:40:23 +01:00
Sven-Hendrik Haase
a13e7b5d40
Merge pull request #116 from der-eismann/update-to-node20
Update to node20
2023-11-22 17:39:45 +01:00
Philipp Trulson
a4bae284e7
Update to node20 2023-11-21 18:29:25 +01:00
dependabot[bot]
c19ddf4c20
Bump @babel/traverse from 7.22.8 to 7.23.2
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.22.8 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-19 11:51:41 +00:00
ShonP40
2d9c0f4337
Updated the readme 2023-09-04 13:19:28 +03:00
ShonP40
615015f76e
Forgot to add draft support here 2023-09-04 12:49:56 +03:00
ShonP40
e3374ce5b6
Ability to create draft releases 2023-09-04 10:06:26 +03:00
7 changed files with 28959 additions and 7519 deletions

View File

@ -1,5 +1,12 @@
# Changelog # 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 ## [2.7.0] - 2023-07-28
- Allow setting an explicit target_commitish [#46](https://github.com/svenstaro/upload-release-action/pull/46) (thanks @Spikatrix) - Allow setting an explicit target_commitish [#46](https://github.com/svenstaro/upload-release-action/pull/46) (thanks @Spikatrix)

View File

@ -18,6 +18,7 @@ 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`) - `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`). - `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`). - `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`). - `prerelease`: Mark the release as a pre-release (Default: `false`).
- `make_latest`: Mark the release as the latest release for the repository (Default: `true`). - `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). - `release_name`: Explicitly set a release name. (Defaults: implicitly same as `tag` via GitHub API).

View File

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

32806
dist/index.js vendored

File diff suppressed because one or more lines are too long

3634
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

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

View File

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