284 Commits

Author SHA1 Message Date
Nick Cipollo
339a81892b preparing release 1.21.0
Some checks failed
Release / Create Release (push) Has been cancelled
Test / check_pr (push) Has been cancelled
2026-03-14 16:42:44 -04:00
Nick Cipollo
df17233557 Resolve pnpm audit results
- bump vitest
- override undici
2026-03-14 16:36:59 -04:00
Nick Cipollo
813e942459 Update release script 2026-03-14 16:27:03 -04:00
Nick Cipollo
7df3a0e749 Update sheepit to use pnpm 2026-03-14 16:13:52 -04:00
Nick Cipollo
caacf56b56 Fixes #595 Bump to node 24 2026-03-11 08:37:45 -04:00
Nick Cipollo
c074b5e19f Fixes #593 Pass commitish into release notes request when present (#594) 2026-03-04 22:51:50 -05:00
dependabot[bot]
9e0366240f Bump @biomejs/biome from 2.3.13 to 2.4.4 (#591)
Bumps [@biomejs/biome](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome) from 2.3.13 to 2.4.4.
- [Release notes](https://github.com/biomejs/biome/releases)
- [Changelog](https://github.com/biomejs/biome/blob/main/packages/@biomejs/biome/CHANGELOG.md)
- [Commits](https://github.com/biomejs/biome/commits/@biomejs/biome@2.4.4/packages/@biomejs/biome)

---
updated-dependencies:
- dependency-name: "@biomejs/biome"
  dependency-version: 2.4.4
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-04 16:43:14 -05:00
dependabot[bot]
5b4b1954b0 Bump glob from 13.0.0 to 13.0.6 (#592)
Bumps [glob](https://github.com/isaacs/node-glob) from 13.0.0 to 13.0.6.
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v13.0.0...v13.0.6)

---
updated-dependencies:
- dependency-name: glob
  dependency-version: 13.0.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-04 16:43:00 -05:00
Nick Cipollo
89bab4d0a7 debug build 2026-02-01 18:20:16 -05:00
dependabot[bot]
00cbfdc960 Bump @actions/github from 6.0.1 to 9.0.0 (#585)
Bumps [@actions/github](https://github.com/actions/toolkit/tree/HEAD/packages/github) from 6.0.1 to 9.0.0.
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/github/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/github)

---
updated-dependencies:
- dependency-name: "@actions/github"
  dependency-version: 9.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-01 18:18:42 -05:00
Nick Cipollo
3f973430f2 Bump to core-3.0.0, move to vitest, support ESM modules (#587) 2026-02-01 17:51:43 -05:00
dependabot[bot]
5b3313d377 Bump @types/node from 25.0.3 to 25.1.0 (#583) 2026-02-01 09:22:25 -05:00
dependabot[bot]
7886be8054 Bump @biomejs/biome from 2.3.10 to 2.3.13 (#586) 2026-02-01 08:40:16 -05:00
Nick Cipollo
411d95d6a3 Rebuild after bumping dependencies 2026-01-06 07:40:00 -05:00
dependabot[bot]
72a3e11e23 Bump @types/node from 24.10.1 to 25.0.3 (#580)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 24.10.1 to 25.0.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 25.0.3
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-06 07:28:46 -05:00
dependabot[bot]
fc196c3dda Bump @actions/core from 1.11.1 to 2.0.1 (#579)
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.11.1 to 2.0.1.
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/@actions/artifact@2.0.1/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-version: 2.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-06 07:28:36 -05:00
dependabot[bot]
788c17510f Bump @biomejs/biome from 2.3.8 to 2.3.10 (#578)
Bumps [@biomejs/biome](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome) from 2.3.8 to 2.3.10.
- [Release notes](https://github.com/biomejs/biome/releases)
- [Changelog](https://github.com/biomejs/biome/blob/main/packages/@biomejs/biome/CHANGELOG.md)
- [Commits](https://github.com/biomejs/biome/commits/@biomejs/biome@2.3.10/packages/@biomejs/biome)

---
updated-dependencies:
- dependency-name: "@biomejs/biome"
  dependency-version: 2.3.10
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-06 07:27:42 -05:00
dependabot[bot]
93682e08f2 Bump @octokit/types from 13.10.0 to 16.0.0 (#577)
Bumps [@octokit/types](https://github.com/octokit/types.ts) from 13.10.0 to 16.0.0.
- [Release notes](https://github.com/octokit/types.ts/releases)
- [Commits](https://github.com/octokit/types.ts/compare/v13.10.0...v16.0.0)

---
updated-dependencies:
- dependency-name: "@octokit/types"
  dependency-version: 16.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-06 07:27:27 -05:00
Nick Cipollo
5f55df31e1 Fixes #552 Add missing readme entry for generateReleaseNotesPreviousTag 2025-12-06 11:05:53 -05:00
Nick Cipollo
be9a4fac3a Remove untildify 2025-12-02 08:29:48 -05:00
Nick Cipollo
23d2cc4c27 Bump jest types 2025-12-02 07:42:05 -05:00
dependabot[bot]
c15e4e52f5 Bump glob from 11.1.0 to 13.0.0 (#573)
Bumps [glob](https://github.com/isaacs/node-glob) from 11.1.0 to 13.0.0.
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v11.1.0...v13.0.0)

---
updated-dependencies:
- dependency-name: glob
  dependency-version: 13.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-02 07:39:42 -05:00
dependabot[bot]
b9387a1970 Bump @biomejs/biome from 2.3.2 to 2.3.8 (#575)
Bumps [@biomejs/biome](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome) from 2.3.2 to 2.3.8.
- [Release notes](https://github.com/biomejs/biome/releases)
- [Changelog](https://github.com/biomejs/biome/blob/main/packages/@biomejs/biome/CHANGELOG.md)
- [Commits](https://github.com/biomejs/biome/commits/@biomejs/biome@2.3.8/packages/@biomejs/biome)

---
updated-dependencies:
- dependency-name: "@biomejs/biome"
  dependency-version: 2.3.8
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-02 07:39:13 -05:00
Nick Cipollo
327ba10342 Fix phantom dependencies 2025-12-01 20:21:27 -05:00
Nick Cipollo
5e58a022dc Migrate form yarn to pnpm 2025-12-01 20:07:09 -05:00
Nick Cipollo
7ffaa93f91 Install dependencies 2025-12-01 18:10:32 -05:00
Nick Cipollo
c266243d9d Bump glob dependencies 2025-11-24 10:59:40 -05:00
dependabot[bot]
29d665a1e2 Bump actions/checkout from 5 to 6 (#569) 2025-11-23 12:07:31 -05:00
dependabot[bot]
8c0975efae Bump glob from 11.0.3 to 11.1.0 (#568) 2025-11-17 19:49:35 -05:00
dependabot[bot]
015a5adb5c Bump js-yaml from 3.14.1 to 3.14.2 (#567) 2025-11-17 15:28:39 -05:00
dependabot[bot]
73edeebfa1 Bump @types/node from 24.6.1 to 24.9.2 (#563) 2025-11-02 09:48:05 -05:00
dependabot[bot]
cacc3525a9 Bump @biomejs/biome from 1.9.4 to 2.3.2 (#564) 2025-11-02 09:45:38 -05:00
dependabot[bot]
0dda22e486 Bump ts-jest from 29.3.4 to 29.4.5 (#561) 2025-11-02 09:44:33 -05:00
dependabot[bot]
e00665902f Bump actions/setup-node from 5 to 6 (#559) 2025-11-02 09:44:21 -05:00
dependabot[bot]
a0e7822741 Bump @types/node from 22.15.29 to 24.6.1 (#555)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.15.29 to 24.6.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 24.6.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-01 10:51:17 -04:00
dependabot[bot]
206b0f552d Bump actions/setup-node from 4 to 5 (#551)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 5.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-01 10:50:49 -04:00
dependabot[bot]
fb82a3ec11 Bump typescript from 5.8.3 to 5.9.3 (#556)
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.8.3 to 5.9.3.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release-publish.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.8.3...v5.9.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-version: 5.9.3
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-01 10:49:10 -04:00
dependabot[bot]
4207a7677e Bump jest-circus from 29.7.0 to 30.2.0 (#557) 2025-10-01 09:28:00 -04:00
Nick Cipollo
b7eabc95ff preparing release 1.20.0
Some checks failed
Test / check_pr (push) Has been cancelled
Release / Create Release (push) Has been cancelled
2025-09-02 16:01:27 -04:00
Nick Cipollo
e87de4c2e4 Fixes #542 Add previous tag option (#550) 2025-09-02 15:56:40 -04:00
Nick Cipollo
98d25d4189 preparing release 1.19.2
Some checks failed
Release / Create Release (push) Has been cancelled
Test / check_pr (push) Has been cancelled
2025-09-02 12:53:03 -04:00
Nick Cipollo
d3601261f8 Fixes #548 Add support body + generated release notes (#549) 2025-09-02 12:27:56 -04:00
Benoît Blanchon
571fe81601 Update immutableCreate's default in the documentation (#547)
The default of `immutableCreate` changed from `true` to `false` in version 1.9.1
2025-09-02 08:11:01 -04:00
Nick Cipollo
1c89adf398 preparing release 1.19.1
Some checks failed
Release / Create Release (push) Has been cancelled
Test / check_pr (push) Has been cancelled
2025-09-01 12:57:13 -04:00
Nick Cipollo
36bf8dd70f References #545 Default immutable builds to false 2025-09-01 12:47:09 -04:00
Nick Cipollo
b12185d71f preparing release 1.19.0
Some checks failed
Release / Create Release (push) Has been cancelled
Test / check_pr (push) Has been cancelled
2025-09-01 10:28:36 -04:00
Nick Cipollo
defcf131e4 Fixes #540 Add support for immutable releases (#544) 2025-08-28 13:15:38 -04:00
Nick Cipollo
05013d58ed Standardize on separate call to generate release notes 2025-08-21 20:33:00 -04:00
dependabot[bot]
20ce211d17 Bump glob from 11.0.2 to 11.0.3 (#534)
Bumps [glob](https://github.com/isaacs/node-glob) from 11.0.2 to 11.0.3.
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v11.0.2...v11.0.3)

---
updated-dependencies:
- dependency-name: glob
  dependency-version: 11.0.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-17 16:53:58 -04:00
dependabot[bot]
a262ce99ce Bump actions/checkout from 4 to 5 (#541)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-17 16:53:46 -04:00
Nick Cipollo
bcfe547070 preparing release 1.18.0
Some checks failed
Release / Create Release (push) Has been cancelled
Test / check_pr (push) Has been cancelled
2025-06-29 16:28:21 -04:00
Nick Cipollo
707331a88d Fixes #529 Collect asset URLs into output 2025-06-29 16:12:11 -04:00
Nick Cipollo
9128f238ee preparing release 1.17.0
Some checks failed
Release / Create Release (push) Has been cancelled
Test / check_pr (push) Has been cancelled
2025-06-28 21:32:06 -04:00
Nick Cipollo
7922049688 Fixes #529 Add zip and tarball urls to output 2025-06-28 21:23:15 -04:00
Nick Cipollo
0683ea3557 Cleanup outputs table formatting 2025-06-21 10:39:02 -04:00
Nick Cipollo
01c9fac73b Add a link to uploading assets in output table 2025-06-21 10:21:16 -04:00
dependabot[bot]
90dc22b77f Bump @types/node from 22.15.18 to 22.15.29 (#524)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.15.18 to 22.15.29.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 22.15.29
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-03 09:12:23 -04:00
dependabot[bot]
10585cb926 Bump @actions/github from 6.0.0 to 6.0.1 (#525)
Bumps [@actions/github](https://github.com/actions/toolkit/tree/HEAD/packages/github) from 6.0.0 to 6.0.1.
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/github/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/github)

---
updated-dependencies:
- dependency-name: "@actions/github"
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-03 09:07:35 -04:00
dependabot[bot]
1896b4fc46 Bump ts-jest from 29.3.2 to 29.3.4 (#526)
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 29.3.2 to 29.3.4.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v29.3.2...v29.3.4)

---
updated-dependencies:
- dependency-name: ts-jest
  dependency-version: 29.3.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-03 09:05:36 -04:00
dependabot[bot]
6996c1bc95 Bump @types/node from 22.13.8 to 22.15.3 (#519)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.13.8 to 22.15.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 22.15.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-14 09:12:26 -04:00
dependabot[bot]
c07d979560 Bump glob from 11.0.1 to 11.0.2 (#520)
Bumps [glob](https://github.com/isaacs/node-glob) from 11.0.1 to 11.0.2.
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v11.0.1...v11.0.2)

---
updated-dependencies:
- dependency-name: glob
  dependency-version: 11.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-14 09:06:24 -04:00
dependabot[bot]
38da029bb7 Bump ts-jest from 29.2.6 to 29.3.2 (#521)
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 29.2.6 to 29.3.2.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v29.2.6...v29.3.2)

---
updated-dependencies:
- dependency-name: ts-jest
  dependency-version: 29.3.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-14 09:06:13 -04:00
dependabot[bot]
bf17a40975 Bump typescript from 5.7.3 to 5.8.3 (#518)
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.7.3 to 5.8.3.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release-publish.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.7.3...v5.8.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-version: 5.8.3
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-14 09:02:53 -04:00
Nick Cipollo
fa4749311e Fixes #513 Don't generate release notes if omitBody is set (#517) 2025-05-11 17:38:39 -04:00
dependabot[bot]
36e78ab629 Bump @octokit/request from 8.1.6 to 8.4.1 (#508)
Bumps [@octokit/request](https://github.com/octokit/request.js) from 8.1.6 to 8.4.1.
- [Release notes](https://github.com/octokit/request.js/releases)
- [Commits](https://github.com/octokit/request.js/compare/v8.1.6...v8.4.1)

---
updated-dependencies:
- dependency-name: "@octokit/request"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-06 23:30:41 -05:00
dependabot[bot]
6c1f9baed2 Bump @octokit/plugin-paginate-rest from 9.1.5 to 9.2.2 (#507)
Bumps [@octokit/plugin-paginate-rest](https://github.com/octokit/plugin-paginate-rest.js) from 9.1.5 to 9.2.2.
- [Release notes](https://github.com/octokit/plugin-paginate-rest.js/releases)
- [Commits](https://github.com/octokit/plugin-paginate-rest.js/compare/v9.1.5...v9.2.2)

---
updated-dependencies:
- dependency-name: "@octokit/plugin-paginate-rest"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-06 23:30:27 -05:00
dependabot[bot]
db62f3f3ad Bump @types/node from 22.13.4 to 22.13.8 (#505)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.13.4 to 22.13.8.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-06 23:28:47 -05:00
dependabot[bot]
e6992e14b1 Bump ts-jest from 29.2.5 to 29.2.6 (#506)
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 29.2.5 to 29.2.6.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v29.2.5...v29.2.6)

---
updated-dependencies:
- dependency-name: ts-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-06 23:28:38 -05:00
Nick Cipollo
440c8c1cb0 preparing release 1.16.0
Some checks failed
Release / Create Release (push) Has been cancelled
Test / check_pr (push) Has been cancelled
2025-02-22 11:35:27 -05:00
Nick Cipollo
e805702217 preparing release 1.17.0 2025-02-22 11:33:08 -05:00
Nick Cipollo
bd572a1942 preparing release 1.17.0 2025-02-22 11:31:24 -05:00
Nick Cipollo
706b28e44c Update tag scheme in sheepit 2025-02-22 11:30:58 -05:00
Nick Cipollo
411ac011df preparing release 1.16.0 2025-02-22 11:26:00 -05:00
Radek Antoniuk
a8c5a7f252 Fixes #474 Regenerate release notes on release updates (#497) 2025-02-20 09:11:25 -05:00
Nick Cipollo
62f16c02e7 Add sheepit config 2025-02-17 17:54:01 -05:00
Nick Cipollo
00e83e3d35 Attempt #1 at fixing workflow file 2025-02-17 16:33:09 -05:00
Nick Cipollo
906fc77113 Add initial releases workflow 2025-02-17 16:29:52 -05:00
Nick Cipollo
17b559883e Add biome and initial format rules 2025-02-17 16:15:54 -05:00
Nick Cipollo
33bf18d283 Install dependency updates 2025-02-16 15:28:37 -05:00
dependabot[bot]
009df9782d Bump @types/node from 22.10.3 to 22.13.4 (#500)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.10.3 to 22.13.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-16 15:09:58 -05:00
dependabot[bot]
4b84ad5c60 Bump glob from 11.0.0 to 11.0.1 (#495)
Bumps [glob](https://github.com/isaacs/node-glob) from 11.0.0 to 11.0.1.
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v11.0.0...v11.0.1)

---
updated-dependencies:
- dependency-name: glob
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-16 14:56:48 -05:00
dependabot[bot]
34dae7e8c0 Bump undici from 5.28.4 to 5.28.5 (#499)
Bumps [undici](https://github.com/nodejs/undici) from 5.28.4 to 5.28.5.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.28.4...v5.28.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-16 14:56:32 -05:00
Cycloctane
9fc271e109 update checkout action version in example (#496) 2025-02-16 14:56:13 -05:00
dependabot[bot]
3cfa40eca4 Bump @octokit/request-error from 5.0.1 to 5.1.1 (#498) 2025-02-15 07:44:36 -05:00
Cycloctane
cdcc88a9ac update Chinese README (#484)
Some checks failed
Test / check_pr (push) Has been cancelled
2025-01-11 21:57:03 -05:00
Nick Cipollo
033b82b409 Throw explicit error if list releases reponse doesn't have data 2025-01-11 21:52:42 -05:00
Nick Cipollo
e774b3eb81 Skip typescript checks 2025-01-11 21:34:25 -05:00
dependabot[bot]
80732ccbb8 Bump typescript from 5.5.4 to 5.7.3 (#490)
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.5.4 to 5.7.3.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.5.4...v5.7.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-11 21:23:24 -05:00
Nick Cipollo
8b72352976 Fix ArtifactUploader errors 2025-01-11 21:20:00 -05:00
dependabot[bot]
e1e10133db Bump @actions/core from 1.10.1 to 1.11.1 (#488)
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.10.1 to 1.11.1.
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-11 21:11:20 -05:00
dependabot[bot]
7fdd38c8a8 Bump ts-jest from 29.2.4 to 29.2.5 (#464)
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 29.2.4 to 29.2.5.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v29.2.4...v29.2.5)

---
updated-dependencies:
- dependency-name: ts-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-11 21:07:20 -05:00
dependabot[bot]
fb175cca64 Bump @types/jest from 29.5.12 to 29.5.14 (#476)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 29.5.12 to 29.5.14.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

---
updated-dependencies:
- dependency-name: "@types/jest"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-11 21:06:53 -05:00
dependabot[bot]
c4d491c3c9 Bump @types/node from 22.0.2 to 22.10.3 (#487)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.0.2 to 22.10.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-11 21:04:25 -05:00
dependabot[bot]
aa3b2fa675 Bump micromatch from 4.0.4 to 4.0.8 (#463)
Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.4 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.4...4.0.8)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-03 15:52:42 -05:00
dependabot[bot]
215ba89ed6 Bump cross-spawn from 7.0.3 to 7.0.6 (#480)
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-19 14:59:01 -05:00
dependabot[bot]
a8bcd956fb Bump @types/node from 20.12.2 to 22.0.2 (#458)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.12.2 to 22.0.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-01 08:20:52 -04:00
dependabot[bot]
bb3709bff2 Bump ts-jest from 29.1.2 to 29.2.4 (#460)
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 29.1.2 to 29.2.4.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v29.1.2...v29.2.4)

---
updated-dependencies:
- dependency-name: ts-jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-01 08:20:35 -04:00
dependabot[bot]
e9a92928b6 Bump typescript from 5.4.3 to 5.5.4 (#459)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.4.3 to 5.5.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.4.3...v5.5.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-01 07:28:44 -04:00
dependabot[bot]
765cc979be Bump glob from 10.3.12 to 11.0.0 (#457)
Bumps [glob](https://github.com/isaacs/node-glob) from 10.3.12 to 11.0.0.
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v10.3.12...v11.0.0)

---
updated-dependencies:
- dependency-name: glob
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-01 07:28:27 -04:00
dependabot[bot]
00fc285722 Bump braces from 3.0.2 to 3.0.3 (#449) 2024-06-16 07:55:48 -04:00
dependabot[bot]
1cbdc80532 Bump glob from 10.3.10 to 10.3.12 (#436)
Bumps [glob](https://github.com/isaacs/node-glob) from 10.3.10 to 10.3.12.
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v10.3.10...v10.3.12)

---
updated-dependencies:
- dependency-name: glob
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-18 10:30:20 -04:00
dependabot[bot]
4b91e3add1 Bump @types/node from 20.11.24 to 20.12.2 (#437)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.11.24 to 20.12.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 14:56:57 -04:00
dependabot[bot]
b6d6ead779 Bump typescript from 5.3.3 to 5.4.3 (#438)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.3.3 to 5.4.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.3.3...v5.4.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 14:56:49 -04:00
dependabot[bot]
1da2ee60a2 Bump undici from 5.28.3 to 5.28.4 (#439)
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 14:56:38 -04:00
Nick Cipollo
4f8867fa5e Update body documentation in readme 2024-03-07 11:36:06 -05:00
Nick Cipollo
f4b7f82f58 Create main build with most recent dependencies. 2024-03-07 09:38:03 -05:00
dependabot[bot]
4074199da7 Bump ts-jest from 29.1.1 to 29.1.2 (#409) 2024-03-07 07:29:30 -05:00
dependabot[bot]
578e4141d1 Bump @types/node from 20.10.6 to 20.11.24 (#426)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.10.6 to 20.11.24.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-07 07:29:17 -05:00
dependabot[bot]
a36404d62c Bump @types/jest from 29.5.11 to 29.5.12 (#427) 2024-03-07 07:28:59 -05:00
dependabot[bot]
7588f628d1 Bump undici from 5.28.2 to 5.28.3 (#423) 2024-03-01 19:25:28 -05:00
Nick Cipollo
1e3e9c6637 Fix production build error 2024-02-05 18:39:33 -05:00
Nick Cipollo
c03240caba apply debug build 2024-02-05 17:36:37 -05:00
Andrew Ovens
66b1844f0b Upgrade to Node 20 (#411) 2024-02-05 17:30:56 -05:00
dependabot[bot]
a8aa04e74a Bump @types/node from 20.10.1 to 20.10.6 (#402)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.10.1 to 20.10.6.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-02 08:48:54 -05:00
dependabot[bot]
39c57feb7b Bump typescript from 5.3.2 to 5.3.3 (#403)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.3.2 to 5.3.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.3.2...v5.3.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-02 08:48:45 -05:00
Nick Cipollo
02a91b5ddd Fix build errors from github api update 2023-12-11 08:37:08 -05:00
dependabot[bot]
0300282a53 Bump @actions/github from 5.1.1 to 6.0.0 (#385)
Bumps [@actions/github](https://github.com/actions/toolkit/tree/HEAD/packages/github) from 5.1.1 to 6.0.0.
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/github/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/github)

---
updated-dependencies:
- dependency-name: "@actions/github"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-11 08:28:16 -05:00
Nick Cipollo
c4a7702e18 Add more info about announcements category 2023-12-11 08:25:38 -05:00
Nick Cipollo
4f53bc4bbe Add discussionCategory caveat to readme 2023-12-11 08:22:58 -05:00
dependabot[bot]
37813b746a Bump @types/jest from 29.5.7 to 29.5.11 (#399)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 29.5.7 to 29.5.11.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

---
updated-dependencies:
- dependency-name: "@types/jest"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-11 08:18:00 -05:00
dependabot[bot]
b878ec7b82 Bump @types/node from 20.9.0 to 20.10.1 (#395)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.9.0 to 20.10.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-11 08:15:39 -05:00
dependabot[bot]
3453d72d33 Bump typescript from 5.2.2 to 5.3.2 (#396)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.2.2 to 5.3.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.2.2...v5.3.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-11 08:15:30 -05:00
dependabot[bot]
712dbe3d31 Bump @types/node from 20.8.6 to 20.9.0 (#390)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.8.6 to 20.9.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-16 13:46:47 -05:00
dependabot[bot]
a454b0181b Bump actions/setup-node from 3 to 4 (#381)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-15 09:04:39 -05:00
dependabot[bot]
454de296e8 Bump @types/jest from 29.5.5 to 29.5.7 (#386)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 29.5.5 to 29.5.7.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

---
updated-dependencies:
- dependency-name: "@types/jest"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-15 09:04:28 -05:00
Nick Cipollo
823125756f Try and force jest-cli/yargs resolution 2023-10-17 19:15:34 -04:00
Nick Cipollo
53f1c32531 try to bump glob again 2023-10-17 19:09:16 -04:00
Nick Cipollo
7b2b452a12 update build workflow 2023-10-17 18:42:43 -04:00
Nick Cipollo
a7c3669135 Revert "Bump glob"
This reverts commit 5a5f227332.
2023-10-17 18:41:23 -04:00
Nick Cipollo
26cdd97dfd Use node 20 2023-10-17 18:36:46 -04:00
Nick Cipollo
5a5f227332 Bump glob 2023-10-17 18:33:40 -04:00
Nick Cipollo
9324133e56 Update typescript config 2023-10-17 18:21:18 -04:00
Nick Cipollo
25918b039f Build main with 10/2023 dependecy updates 2023-10-17 18:09:44 -04:00
dependabot[bot]
c18db47aba Bump @actions/core from 1.10.0 to 1.10.1 (#375) 2023-10-17 17:13:18 -04:00
dependabot[bot]
d968c2d7a7 Bump @types/node from 20.6.0 to 20.8.6 (#379) 2023-10-17 17:12:54 -04:00
dependabot[bot]
e386e41d9f Bump jest-circus from 29.6.4 to 29.7.0 (#376) 2023-10-17 17:12:35 -04:00
dependabot[bot]
476ee61234 Bump jest and @types/jest (#377) 2023-10-17 16:42:50 -04:00
dependabot[bot]
6db48ced34 Bump @babel/traverse from 7.17.3 to 7.23.2 (#378) 2023-10-17 16:17:57 -04:00
Nick Cipollo
7ce102b15b Build (dev) with dependency updates 2023-09-11 08:10:29 -04:00
dependabot[bot]
ddbfce0d45 Bump jest and @types/jest (#367)
Bumps [jest](https://github.com/jestjs/jest/tree/HEAD/packages/jest) and [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest). These dependencies needed to be updated together.

Updates `jest` from 29.5.0 to 29.6.4
- [Release notes](https://github.com/jestjs/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jestjs/jest/commits/v29.6.4/packages/jest)

Updates `@types/jest` from 29.5.2 to 29.5.4
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

---
updated-dependencies:
- dependency-name: jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
- dependency-name: "@types/jest"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-11 08:10:12 -04:00
dependabot[bot]
b4b70f8196 Bump @types/node from 20.3.3 to 20.6.0 (#366)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.3.3 to 20.6.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-11 08:08:18 -04:00
dependabot[bot]
2600a44651 Bump typescript from 5.1.6 to 5.2.2 (#362)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.1.6 to 5.2.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.1.6...v5.2.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-11 08:05:57 -04:00
dependabot[bot]
eb7dfdf4be Bump jest-circus from 29.5.0 to 29.6.4 (#359)
Bumps [jest-circus](https://github.com/jestjs/jest/tree/HEAD/packages/jest-circus) from 29.5.0 to 29.6.4.
- [Release notes](https://github.com/jestjs/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jestjs/jest/commits/v29.6.4/packages/jest-circus)

---
updated-dependencies:
- dependency-name: jest-circus
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-11 08:04:32 -04:00
dependabot[bot]
e2ce571994 Bump glob from 10.3.1 to 10.3.4 (#361)
Bumps [glob](https://github.com/isaacs/node-glob) from 10.3.1 to 10.3.4.
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v10.3.1...v10.3.4)

---
updated-dependencies:
- dependency-name: glob
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-11 08:04:18 -04:00
dependabot[bot]
69d25a3184 Bump actions/checkout from 3 to 4 (#364)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-11 08:03:59 -04:00
dependabot[bot]
b36d9409a9 Bump semver from 6.3.0 to 6.3.1 (#350)
Bumps [semver](https://github.com/npm/node-semver) from 6.3.0 to 6.3.1.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v6.3.1/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v6.3.0...v6.3.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-26 14:55:34 -04:00
Nick Cipollo
6c75be85e5 Fixes #357 Use a read stream for artifacts.
Some checks failed
Test / check_pr (push) Has been cancelled
This seems to be safe since octokit mentions ReadableStreams in their fetcher wrapper & tests: https://github.com/octokit/request.js/blob/main/src/fetch-wrapper.ts#L44
(and also it seems to work when I test it).
2023-08-24 08:37:01 -04:00
Nick Cipollo
2d19fb459b Remove lib 2023-08-24 07:40:06 -04:00
Nick Cipollo
9cfd0835c6 Remove explicit typescript src setting 2023-08-24 07:39:05 -04:00
Nick Cipollo
37c87f6b53 Fixes #349 Copy description of makeLatest legacy from github docs 2023-07-10 17:35:27 -04:00
Nick Cipollo
7288236d4e build dep updates 2023-07-01 11:32:09 -04:00
dependabot[bot]
384ae1fad6 Bump @types/node from 18.15.11 to 20.3.3 (#341)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.15.11 to 20.3.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-01 11:31:20 -04:00
dependabot[bot]
9347837845 Bump typescript from 5.0.4 to 5.1.6 (#343)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.0.4 to 5.1.6.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/commits)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-01 11:31:00 -04:00
dependabot[bot]
893ce36b2e Bump glob from 10.2.6 to 10.3.1 (#342)
Bumps [glob](https://github.com/isaacs/node-glob) from 10.2.6 to 10.3.1.
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v10.2.6...v10.3.1)

---
updated-dependencies:
- dependency-name: glob
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-01 10:43:17 -04:00
dependabot[bot]
c07e9f4dff Bump ts-jest from 29.1.0 to 29.1.1 (#345)
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 29.1.0 to 29.1.1.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v29.1.0...v29.1.1)

---
updated-dependencies:
- dependency-name: ts-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-01 10:42:09 -04:00
Nick Cipollo
cb77c9ee9c Revert "Bump @types/node from 18.15.11 to 20.3.2 (#340)"
This reverts commit 8c78ca2662.
2023-06-27 15:40:20 -04:00
dependabot[bot]
8c78ca2662 Bump @types/node from 18.15.11 to 20.3.2 (#340)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.15.11 to 20.3.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-27 15:25:21 -04:00
dependabot[bot]
2b385230bf Bump glob from 10.2.2 to 10.2.6 (#339)
Bumps [glob](https://github.com/isaacs/node-glob) from 10.2.2 to 10.2.6.
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v10.2.2...v10.2.6)

---
updated-dependencies:
- dependency-name: glob
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-27 15:20:29 -04:00
dependabot[bot]
3ff6c7eb03 Bump @types/jest from 29.5.1 to 29.5.2 (#337)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 29.5.1 to 29.5.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

---
updated-dependencies:
- dependency-name: "@types/jest"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-27 15:20:07 -04:00
dependabot[bot]
3aa9307b7d Bump typescript from 5.0.3 to 5.0.4 (#327)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.0.3 to 5.0.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.0.3...v5.0.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-27 15:19:58 -04:00
dependabot[bot]
c13ca79f19 Bump ts-jest from 29.0.5 to 29.1.0 (#329)
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 29.0.5 to 29.1.0.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v29.0.5...v29.1.0)

---
updated-dependencies:
- dependency-name: ts-jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-23 09:59:29 -04:00
dependabot[bot]
e9a4ba6596 Bump glob from 9.3.2 to 10.2.2 (#330)
Bumps [glob](https://github.com/isaacs/node-glob) from 9.3.2 to 10.2.2.
- [Release notes](https://github.com/isaacs/node-glob/releases)
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v9.3.2...v10.2.2)

---
updated-dependencies:
- dependency-name: glob
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-23 09:58:48 -04:00
dependabot[bot]
ef679c1c54 Bump @types/jest from 29.5.0 to 29.5.1 (#326)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 29.5.0 to 29.5.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

---
updated-dependencies:
- dependency-name: "@types/jest"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-23 09:58:33 -04:00
Nick Cipollo
eb05307dce Fix stupid mocking error 2023-04-01 18:12:05 -04:00
Nick Cipollo
5a8bbe8ea7 Try and fix weird build error 2023-04-01 17:33:40 -04:00
dependabot[bot]
a48ee3f85e Bump glob from 8.1.0 to 9.3.2 (#321)
Bumps [glob](https://github.com/isaacs/node-glob) from 8.1.0 to 9.3.2.
- [Release notes](https://github.com/isaacs/node-glob/releases)
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v8.1.0...v9.3.2)

---
updated-dependencies:
- dependency-name: glob
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-01 17:10:28 -04:00
dependabot[bot]
bf3b51b3f3 Bump typescript from 4.9.5 to 5.0.3 (#320)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.9.5 to 5.0.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/commits)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-01 17:09:42 -04:00
Spencer C
67d60d576c Readme: update checkout to v3 (#303)
Update checkout to v3 which is the latest version and encourage people to use it when creating a release

Co-authored-by: Spencer Comfort <109806759+GiddyGoatGaming@users.noreply.github.com>
2023-04-01 17:09:32 -04:00
dependabot[bot]
0371ac0a22 Bump @types/node from 18.11.18 to 18.15.11 (#319)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.11.18 to 18.15.11.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-01 17:09:09 -04:00
dependabot[bot]
231dd3fbcd Bump jest-circus from 29.4.1 to 29.5.0 (#318)
Bumps [jest-circus](https://github.com/facebook/jest/tree/HEAD/packages/jest-circus) from 29.4.1 to 29.5.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v29.5.0/packages/jest-circus)

---
updated-dependencies:
- dependency-name: jest-circus
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-01 17:08:56 -04:00
dependabot[bot]
d51f1872a4 Bump jest-circus from 29.3.1 to 29.4.1 (#306)
Bumps [jest-circus](https://github.com/facebook/jest/tree/HEAD/packages/jest-circus) from 29.3.1 to 29.4.1.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v29.4.1/packages/jest-circus)

---
updated-dependencies:
- dependency-name: jest-circus
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-23 22:04:06 -05:00
dependabot[bot]
324f6f4a19 Bump typescript from 4.9.4 to 4.9.5 (#305)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.9.4 to 4.9.5.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.9.4...v4.9.5)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-23 22:03:47 -05:00
dependabot[bot]
ef3e5b02bd Bump glob and @types/glob (#304)
Bumps [glob](https://github.com/isaacs/node-glob) and [@types/glob](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/glob). These dependencies needed to be updated together.

Updates `glob` from 8.0.3 to 8.1.0
- [Release notes](https://github.com/isaacs/node-glob/releases)
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v8.0.3...v8.1.0)

Updates `@types/glob` from 8.0.0 to 8.0.1
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/glob)

---
updated-dependencies:
- dependency-name: glob
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: "@types/glob"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-23 22:03:27 -05:00
Nick Cipollo
215101a6e6 Fixes #301 Add remediation suggestion to 404 errors 2023-01-28 13:58:46 -05:00
dependabot[bot]
a5996b3a73 Bump @types/node from 18.11.10 to 18.11.18 (#292)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.11.10 to 18.11.18.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-08 20:28:13 -05:00
dependabot[bot]
8fd54fa522 Bump typescript from 4.9.3 to 4.9.4 (#293)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.9.3 to 4.9.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.9.3...v4.9.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-08 20:28:02 -05:00
dependabot[bot]
c358143117 Bump json5 from 2.2.1 to 2.2.3 (#296)
Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.1...v2.2.3)

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

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-08 20:27:55 -05:00
Nick Cipollo
a2e71bdd4e Update "makeLatest" so it's always defined
Some checks failed
Test / check_pr (push) Has been cancelled
2022-12-11 13:56:37 -05:00
Nick Cipollo
78ea7b5528 Build main 2022-12-11 13:53:05 -05:00
dependabot[bot]
3898f7abfd Bump jest-circus from 29.2.2 to 29.3.1 (#280)
Bumps [jest-circus](https://github.com/facebook/jest/tree/HEAD/packages/jest-circus) from 29.2.2 to 29.3.1.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v29.3.1/packages/jest-circus)

---
updated-dependencies:
- dependency-name: jest-circus
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-11 13:49:04 -05:00
dependabot[bot]
2afcaec515 Bump @types/node from 18.11.8 to 18.11.10 (#281)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.11.8 to 18.11.10.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-11 13:48:55 -05:00
dependabot[bot]
2954d914c0 Bump typescript from 4.8.4 to 4.9.3 (#282)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.8.4 to 4.9.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.8.4...v4.9.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-11 13:48:46 -05:00
Eric Cornelissen
0bf6967166 Add make_latest option (#283) 2022-12-11 13:45:00 -05:00
Nick Cipollo
3dd806f2bf Fix typo in readme 2022-11-25 13:42:27 -05:00
Nick Cipollo
443f2c0c79 Build with security updates 2022-11-11 13:54:21 -05:00
dependabot[bot]
94ba3874ff Bump minimatch from 3.0.4 to 3.1.2 (#278)
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

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

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-11 13:50:46 -05:00
dependabot[bot]
c30ce84c21 Bump jest-circus from 29.1.2 to 29.2.2 (#275)
Bumps [jest-circus](https://github.com/facebook/jest/tree/HEAD/packages/jest-circus) from 29.1.2 to 29.2.2.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v29.2.2/packages/jest-circus)

---
updated-dependencies:
- dependency-name: jest-circus
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-11 13:48:23 -05:00
dependabot[bot]
1830b037be Bump @types/node from 18.7.23 to 18.11.8 (#276)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.7.23 to 18.11.8.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-11 13:48:06 -05:00
Nick Cipollo
3bacd9e49a Fixes #267 Add ActionSkipper 2022-11-11 13:46:22 -05:00
Misite Bao
3ac4132803 Add Chinese README (#269) 2022-10-24 17:19:37 -04:00
Nick Cipollo
b072aaafe1 update debug build 2022-10-04 08:09:17 -04:00
Nick Cipollo
f3ea29dca7 Fixes #262 normalize artifact paths 2022-10-04 08:08:09 -04:00
Nick Cipollo
889eb279f8 Fixes #261 Correctly set default on updateOnlyUnreleased 2022-10-02 18:19:43 -04:00
Nick Cipollo
5b3ed26ce2 Fixes #219 Add argument to allow only updating drafts and prereleases 2022-10-02 17:35:42 -04:00
Nick Cipollo
fc324198c9 Updating dependencies 10/02/2022 2022-10-02 15:15:54 -04:00
dependabot[bot]
7018cf7fe6 Bump @actions/core from 1.9.1 to 1.10.0 (#258)
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.9.1 to 1.10.0.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-02 14:51:39 -04:00
dependabot[bot]
c0a948e0a1 Bump @types/node from 18.0.0 to 18.7.23 (#255)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.0.0 to 18.7.23.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-02 14:51:24 -04:00
dependabot[bot]
64d30d31e9 Bump @actions/github from 5.0.3 to 5.1.1 (#259)
Bumps [@actions/github](https://github.com/actions/toolkit/tree/HEAD/packages/github) from 5.0.3 to 5.1.1.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/github/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/github)

---
updated-dependencies:
- dependency-name: "@actions/github"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-02 14:46:17 -04:00
dependabot[bot]
0776e821ce Bump @types/glob from 7.2.0 to 8.0.0 (#249)
Bumps [@types/glob](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/glob) from 7.2.0 to 8.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/glob)

---
updated-dependencies:
- dependency-name: "@types/glob"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-02 14:43:29 -04:00
dependabot[bot]
21fb52b82e Bump typescript from 4.7.3 to 4.8.4 (#256)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.7.3 to 4.8.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.7.3...v4.8.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-02 14:42:22 -04:00
dependabot[bot]
994ff9f3e4 Bump jest-circus from 28.1.0 to 29.1.2 (#257)
Bumps [jest-circus](https://github.com/facebook/jest/tree/HEAD/packages/jest-circus) from 28.1.0 to 29.1.2.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v29.1.2/packages/jest-circus)

---
updated-dependencies:
- dependency-name: jest-circus
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-02 14:41:45 -04:00
Nick Cipollo
ca859d0f82 Fixes #253 bump node to node16 2022-09-12 19:14:33 -04:00
dependabot[bot]
5ffcfca321 Bump @actions/core from 1.9.0 to 1.9.1 (#244)
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.9.0 to 1.9.1.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-01 23:22:03 -04:00
Mohammad Parvin
3d2de22e3d Update README.md (#199)
Failed to add secret. Secret names must not start with GITHUB_.
2022-07-17 11:26:42 -04:00
dependabot[bot]
353daac015 Bump @actions/core from 1.8.2 to 1.9.0 (#228)
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.8.2 to 1.9.0.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-17 11:25:40 -04:00
dependabot[bot]
17085ec3c4 Bump ts-jest from 28.0.4 to 28.0.5 (#229)
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 28.0.4 to 28.0.5.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v28.0.4...v28.0.5)

---
updated-dependencies:
- dependency-name: ts-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-17 11:25:28 -04:00
dependabot[bot]
2d5b7ef7e5 Bump @types/node from 17.0.40 to 18.0.0 (#230)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.40 to 18.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-17 11:25:16 -04:00
marcomow
a14d847ec5 add missing space (#218) 2022-06-16 17:48:34 -04:00
dependabot[bot]
f24914729f Bump @types/node from 17.0.38 to 17.0.40 (#220)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.38 to 17.0.40.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-07 11:54:10 -04:00
Nick Cipollo
d7ebb9b36b Update jest and fix tests 2022-06-07 11:42:45 -04:00
dependabot[bot]
8a61907f5d Bump jest-circus from 27.5.1 to 28.1.0 (#213)
Bumps [jest-circus](https://github.com/facebook/jest/tree/HEAD/packages/jest-circus) from 27.5.1 to 28.1.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v28.1.0/packages/jest-circus)

---
updated-dependencies:
- dependency-name: jest-circus
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-07 11:31:19 -04:00
Nick Cipollo
c9494285dc Fix tests 2022-06-07 11:19:26 -04:00
dependabot[bot]
3a295d0589 Bump @actions/core from 1.6.0 to 1.8.2 (#216) 2022-06-06 18:48:29 -04:00
dependabot[bot]
c99c52b068 Bump typescript from 4.7.2 to 4.7.3 (#222) 2022-06-06 18:46:58 -04:00
dependabot[bot]
1298899b9a Bump @actions/github from 5.0.1 to 5.0.3 (#221) 2022-06-06 18:45:56 -04:00
dependabot[bot]
15c5838b25 Bump glob from 7.2.0 to 8.0.3 (#217) 2022-06-06 09:38:21 -04:00
dependabot[bot]
eebdfaf405 Bump @types/node from 17.0.23 to 17.0.38 (#215)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.23 to 17.0.38.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-06 08:58:37 -04:00
dependabot[bot]
1cbbf13906 Bump typescript from 4.6.3 to 4.7.2 (#214)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.6.3 to 4.7.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.6.3...v4.7.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-06 08:58:22 -04:00
dependabot[bot]
421213779e Bump @types/node from 17.0.21 to 17.0.23 (#192)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.21 to 17.0.23.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-02 14:14:12 -04:00
dependabot[bot]
7719db6a69 Bump ts-jest from 27.1.3 to 27.1.4 (#193)
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 27.1.3 to 27.1.4.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v27.1.3...v27.1.4)

---
updated-dependencies:
- dependency-name: ts-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-02 14:11:01 -04:00
dependabot[bot]
0e0b15bbc5 Bump @types/jest from 27.4.0 to 27.4.1 (#194)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 27.4.0 to 27.4.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

---
updated-dependencies:
- dependency-name: "@types/jest"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-02 14:10:53 -04:00
dependabot[bot]
29a6629a49 Bump @actions/github from 5.0.0 to 5.0.1 (#195)
Bumps [@actions/github](https://github.com/actions/toolkit/tree/HEAD/packages/github) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/github/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/github)

---
updated-dependencies:
- dependency-name: "@actions/github"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-02 14:10:29 -04:00
Nick Cipollo
18990f60e0 Tweak coverage settings. 2022-03-31 22:52:04 -04:00
Nick Cipollo
d37e2be74a Add thresholds for coverage 2022-03-31 20:43:03 -04:00
Nick Cipollo
eed740324c Revert "Ensure test failures still work"
This reverts commit 4f104f8afe.
2022-03-31 18:08:50 -04:00
Nick Cipollo
4f104f8afe Ensure test failures still work 2022-03-31 18:08:21 -04:00
Nick Cipollo
700d6bf347 move jest config into package.json 2022-03-31 18:07:15 -04:00
dependabot[bot]
58ae73b360 Bump typescript from 4.5.2 to 4.6.3 (#189)
Some checks failed
Test / check_pr (push) Has been cancelled
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.5.2 to 4.6.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.5.2...v4.6.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-31 17:12:44 -04:00
Nick Cipollo
ffcd2d4c10 Fixes #185 Add omitDraftDuringUpdate input (#190) 2022-03-31 17:07:42 -04:00
Nick Cipollo
c309084e8b tweak repo spelling 2022-03-31 11:11:59 -04:00
Nick Cipollo
819589c886 Update readme inputs table. 2022-03-31 11:11:18 -04:00
Nick Cipollo
6297172c9f Generate JS from typescript 2022-03-31 10:58:25 -04:00
Eder Matos
918a7af1fe Update README.md (#188) 2022-03-31 10:56:55 -04:00
dependabot[bot]
6ba4f20c9a Bump typescript from 4.5.2 to 4.6.2 (#177)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.5.2 to 4.6.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.5.2...v4.6.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-31 10:44:37 -04:00
dependabot[bot]
97a630fc75 Bump minimist from 1.2.5 to 1.2.6 (#187)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-31 10:43:26 -04:00
dependabot[bot]
3f844db37a Bump jest-circus from 27.4.5 to 27.5.1 (#179)
Bumps [jest-circus](https://github.com/facebook/jest/tree/HEAD/packages/jest-circus) from 27.4.5 to 27.5.1.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v27.5.1/packages/jest-circus)

---
updated-dependencies:
- dependency-name: jest-circus
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-11 10:28:52 -05:00
dependabot[bot]
9e1799683e Bump node-fetch from 2.6.1 to 2.6.7 (#183)
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.1...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-11 10:28:42 -05:00
dependabot[bot]
6553b535a3 Bump @types/node from 17.0.7 to 17.0.21 (#178)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.7 to 17.0.21.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-07 09:07:05 -05:00
dependabot[bot]
132ba9b615 Bump jest from 27.4.5 to 27.5.1 (#176)
Bumps [jest](https://github.com/facebook/jest) from 27.4.5 to 27.5.1.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v27.4.5...v27.5.1)

---
updated-dependencies:
- dependency-name: jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-07 09:06:09 -05:00
dependabot[bot]
99014f6c59 Bump ts-jest from 27.1.2 to 27.1.3 (#169)
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 27.1.2 to 27.1.3.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v27.1.2...v27.1.3)

---
updated-dependencies:
- dependency-name: ts-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-07 09:05:59 -05:00
dependabot[bot]
e663819a51 Bump actions/checkout from 2.4.0 to 3 (#180)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.4.0 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.4.0...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-07 09:05:45 -05:00
dependabot[bot]
69242acd76 Bump jest from 27.4.2 to 27.4.5 (#160)
Bumps [jest](https://github.com/facebook/jest) from 27.4.2 to 27.4.5.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v27.4.2...v27.4.5)

---
updated-dependencies:
- dependency-name: jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-03 20:05:38 -05:00
dependabot[bot]
09a8e66990 Bump jest-circus from 27.4.2 to 27.4.5 (#161)
Bumps [jest-circus](https://github.com/facebook/jest/tree/HEAD/packages/jest-circus) from 27.4.2 to 27.4.5.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v27.4.5/packages/jest-circus)

---
updated-dependencies:
- dependency-name: jest-circus
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-03 20:02:16 -05:00
dependabot[bot]
6f8234ce3e Bump @types/node from 16.11.12 to 17.0.7 (#165)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.11.12 to 17.0.7.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-03 19:58:04 -05:00
dependabot[bot]
8131ae1c5d Bump ts-jest from 27.0.7 to 27.1.2 (#159)
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 27.0.7 to 27.1.2.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v27.0.7...v27.1.2)

---
updated-dependencies:
- dependency-name: ts-jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-03 19:57:40 -05:00
dependabot[bot]
2c158d72a4 Bump @types/jest from 27.0.3 to 27.4.0 (#162)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 27.0.3 to 27.4.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

---
updated-dependencies:
- dependency-name: "@types/jest"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-03 19:55:19 -05:00
Anton Larionov
404de39364 Update README example with permissions block (#164)
Documentation:
- https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token/
- https://docs.github.com/en/actions/security-guides/automatic-token-authentication
2022-01-03 19:55:03 -05:00
dependabot[bot]
b9600947f7 Bump @types/node from 16.11.6 to 16.11.12 (#156)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.11.6 to 16.11.12.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-08 08:35:35 -05:00
dependabot[bot]
e31291f6a4 Bump jest-circus from 27.3.1 to 27.4.2 (#155)
Bumps [jest-circus](https://github.com/facebook/jest/tree/HEAD/packages/jest-circus) from 27.3.1 to 27.4.2.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v27.4.2/packages/jest-circus)

---
updated-dependencies:
- dependency-name: jest-circus
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-08 08:35:25 -05:00
dependabot[bot]
e5cc18bd59 Bump @types/jest from 27.0.2 to 27.0.3 (#154)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 27.0.2 to 27.0.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

---
updated-dependencies:
- dependency-name: "@types/jest"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-08 08:13:48 -05:00
dependabot[bot]
6cddb7ed31 Bump typescript from 4.4.4 to 4.5.2 (#153)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.4.4 to 4.5.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.4.4...v4.5.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-08 08:13:36 -05:00
dependabot[bot]
8d640a794c Bump jest from 27.3.1 to 27.4.2 (#151)
Bumps [jest](https://github.com/facebook/jest) from 27.3.1 to 27.4.2.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v27.3.1...v27.4.2)

---
updated-dependencies:
- dependency-name: jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-08 08:10:56 -05:00
Nick Cipollo
268f2377f2 Fix test which is failing when pushing a tag 2021-11-26 17:26:50 -05:00
Nick Cipollo
40bb172bd0 Fixes #135 Add support for generate_release_notes
Some checks failed
Test / check_pr (push) Has been cancelled
2021-11-26 16:55:04 -05:00
Nick Cipollo
66aaa1eb00 Setup to use ncc 2021-11-26 14:48:25 -05:00
dependabot[bot]
8aada7312c Bump actions/checkout from 2.3.5 to 2.4.0 (#146)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.5 to 2.4.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.3.5...v2.4.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-08 08:44:34 -05:00
dependabot[bot]
ec76ac98f7 Bump typescript from 4.4.3 to 4.4.4 (#145)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.4.3 to 4.4.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.4.3...v4.4.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-08 08:44:23 -05:00
dependabot[bot]
e709279ee8 Bump @types/node from 16.10.2 to 16.11.6 (#138)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.10.2 to 16.11.6.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-08 08:43:37 -05:00
dependabot[bot]
b7a6e45e99 Bump jest-circus from 27.2.4 to 27.3.1 (#137)
Bumps [jest-circus](https://github.com/facebook/jest/tree/HEAD/packages/jest-circus) from 27.2.4 to 27.3.1.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v27.3.1/packages/jest-circus)

---
updated-dependencies:
- dependency-name: jest-circus
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-08 08:43:25 -05:00
dependabot[bot]
986121c24a Bump jest from 27.2.4 to 27.3.1 (#139)
Bumps [jest](https://github.com/facebook/jest) from 27.2.4 to 27.3.1.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v27.2.4...v27.3.1)

---
updated-dependencies:
- dependency-name: jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-02 08:03:28 -04:00
dependabot[bot]
2be34cfeec Bump @types/glob from 7.1.4 to 7.2.0 (#140)
Bumps [@types/glob](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/glob) from 7.1.4 to 7.2.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/glob)

---
updated-dependencies:
- dependency-name: "@types/glob"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-02 08:03:18 -04:00
dependabot[bot]
592ac51c49 Bump ts-jest from 27.0.5 to 27.0.7 (#141)
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 27.0.5 to 27.0.7.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v27.0.5...v27.0.7)

---
updated-dependencies:
- dependency-name: ts-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-01 11:46:25 -04:00
Nick Cipollo
01e1051edf Fixes #136 Globber now also supports new line as separator. 2021-10-25 08:03:03 -04:00
dependabot[bot]
15ede536e2 Bump actions/checkout from 2.3.4 to 2.3.5 (#132)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.4 to 2.3.5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.3.4...v2.3.5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-21 07:48:09 -04:00
Nick Cipollo
3e88dac4cf Update build artifacts 2021-10-03 18:47:56 -04:00
Nick Cipollo
95aae1ba96 Fixes #120 Artifacts can be removed even when new ones aren't provided 2021-10-03 18:46:12 -04:00
Nick Cipollo
821cbcc349 Bump typescript, fix build errors around catch blocks. 2021-10-03 17:21:27 -04:00
dependabot[bot]
4531373c80 Bump typescript from 4.3.5 to 4.4.3 (#125)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.3.5 to 4.4.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.3.5...v4.4.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-03 17:12:40 -04:00
dependabot[bot]
be8fb09624 Bump @types/node from 16.7.11 to 16.10.2 (#126)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.7.11 to 16.10.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-03 16:46:16 -04:00
dependabot[bot]
0d72fe9393 Bump jest-circus from 27.1.0 to 27.2.4 (#124)
Bumps [jest-circus](https://github.com/facebook/jest/tree/HEAD/packages/jest-circus) from 27.1.0 to 27.2.4.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v27.2.4/packages/jest-circus)

---
updated-dependencies:
- dependency-name: jest-circus
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-03 16:46:05 -04:00
dependabot[bot]
045b513398 Bump glob from 7.1.7 to 7.2.0 (#123)
Bumps [glob](https://github.com/isaacs/node-glob) from 7.1.7 to 7.2.0.
- [Release notes](https://github.com/isaacs/node-glob/releases)
- [Changelog](https://github.com/isaacs/node-glob/blob/master/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v7.1.7...v7.2.0)

---
updated-dependencies:
- dependency-name: glob
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-03 16:45:54 -04:00
dependabot[bot]
b57e76011b Bump @actions/core from 1.5.0 to 1.6.0 (#122)
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.5.0 to 1.6.0.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-03 16:45:43 -04:00
Nick Cipollo
62f9f43ceb Bump jest 2021-09-30 22:54:12 -04:00
dependabot[bot]
61fe7e2b7b Bump ansi-regex from 5.0.0 to 5.0.1 (#121)
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v5.0.0...v5.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-28 09:39:04 -04:00
dependabot[bot]
b37dba0653 Bump tmpl from 1.0.4 to 1.0.5 (#119)
Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/daaku/nodejs-tmpl/releases)
- [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-28 09:37:51 -04:00
Nick Cipollo
cba6a1b4f8 Update readme to provide examples for owner and repo. 2021-09-12 19:03:06 -04:00
Nick Cipollo
e97ceb3e08 Fixes #69 Indicate the scope required for personal access tokens. 2021-09-12 18:06:38 -04:00
dependabot[bot]
c18d31567a Bump jest-circus from 27.0.6 to 27.1.0 (#114)
Bumps [jest-circus](https://github.com/facebook/jest/tree/HEAD/packages/jest-circus) from 27.0.6 to 27.1.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v27.1.0/packages/jest-circus)

---
updated-dependencies:
- dependency-name: jest-circus
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-12 17:43:35 -04:00
dependabot[bot]
91233e9c66 Bump @types/node from 16.4.12 to 16.7.11 (#116)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.4.12 to 16.7.11.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-12 17:43:27 -04:00
dependabot[bot]
a4548f83be Bump @actions/core from 1.4.0 to 1.5.0 (#113)
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-06 21:32:23 -04:00
dependabot[bot]
2162d1bc14 Bump @types/jest from 26.0.24 to 27.0.1 (#112)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.24 to 27.0.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

---
updated-dependencies:
- dependency-name: "@types/jest"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-06 21:32:10 -04:00
Rosalie
f597c8ad62 Add removeArtifacts (#109) 2021-09-06 18:57:37 -04:00
dependabot[bot]
a4f828a4e5 Bump path-parse from 1.0.6 to 1.0.7 (#105)
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-11 10:48:06 -04:00
anatawa12
4fd91f8b23 set default value for token action input (#104) 2021-08-06 14:39:07 -04:00
68 changed files with 50625 additions and 6322 deletions

View File

@@ -11,18 +11,27 @@ jobs:
check_pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4
with:
version: latest
- name: "yarn install"
run: yarn install
- uses: actions/setup-node@v6
with:
node-version: 20
cache: 'pnpm'
- name: "yarn build"
run: yarn build
- name: "pnpm install"
run: pnpm install
- name: "pnpm build"
run: pnpm build
- name: "check for uncommitted changes"
# Ensure no changes, but ignore node_modules dir since dev/fresh ci deps installed.
run: |
git diff --exit-code --stat -- . ':!node_modules' \
|| (echo "##[error] found changed files after build. please 'yarn build && npm run format'" \
|| (echo "##[error] found changed files after build. please 'pnpm build && pnpm run format'" \
"and check in all changes" \
&& exit 1)

22
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,22 @@
name: Release
on:
push:
tags:
- '*'
jobs:
create_release:
if: github.ref != 'refs/tags/v1'
runs-on: ubuntu-latest
name: Create Release
steps:
- uses: actions/checkout@v6
- name: Create Release
id: create_release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
draft: true
generateReleaseNotes: true

View File

@@ -5,10 +5,19 @@ jobs:
check_pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4
with:
version: latest
- name: "yarn install"
run: yarn install
- uses: actions/setup-node@v6
with:
node-version: 20
cache: 'pnpm'
- name: "yarn test"
run: yarn test
- name: "pnpm install"
run: pnpm install
- name: "pnpm test"
run: pnpm test

12
.gitignore vendored
View File

@@ -1,5 +1,6 @@
node_modules/
__tests__/runner/*
.DS_Store
# Created by https://www.gitignore.io/api/webstorm
# Edit at https://www.gitignore.io/?templates=webstorm
@@ -91,5 +92,14 @@ fabric.properties
# Markdown Navigator plugin
.idea/**/markdown-navigator.xml
.idea/**/markdown-navigator/
.idea/copilot.*
# End of https://www.gitignore.io/api/webstorm
# Coverage
coverage
# Ignore lib, it contains intermediates
/lib
# Claude
.claude/settings.local.json

6
.idea/biome.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="BiomeSettings">
<option name="enableLspFormat" value="true" />
</component>
</project>

View File

@@ -2,35 +2,58 @@
This action will create a GitHub release and optionally upload an artifact to it.
<div align="center">
<strong>
<samp>
[English](README.md) · [简体中文](README.zh-Hans.md)
</samp>
</strong>
</div>
## Action Inputs
- **allowUpdates**: An optional flag which indicates if we should update a release if it already exists. Defaults to `false`.
- **artifactErrorsFailBuild**: An optional flag which indicates if artifact read or upload errors should fail the build.
- **artifact** (deprecated): An optional set of paths representing artifacts to upload to the release. This may be a single path or a comma delimited list of paths (or globs).
- **artifacts**: An optional set of paths representing artifacts to upload to the release. This may be a single path or a comma delimited list of paths (or globs).
- **artifactContentType**: The content type of the artifact. Defaults to `raw`.
- **body**: An optional body for the release.
- **bodyFile**: An optional body file for the release. This should be the path to the file.
- **commit**: An optional commit reference. This will be used to create the tag if it does not exist.
- **discussionCategory**: When provided this will generate a discussion of the specified category. The category must exist otherwise this will cause the action to fail. This isn't used with draft releases.
- **draft**: Optionally marks this release as a draft release. Set to `true` to enable.
- **name**: An optional name for the release. If this is omitted the tag will be used.
- **omitBody**: Indicates if the release body should be omitted.
- **omitBodyDuringUpdate**: Indicates if the release body should be omitted during updates. The body will still be applied for newly created releases. This will preserve the existing body during updates.
- **omitName**: Indicates if the release name should be omitted.
- **omitNameDuringUpdate**: Indicates if the release name should be omitted during updates. The name will still be applied for newly created releases. This will preserve the existing name during updates.
- **omitPrereleaseDuringUpdate**: Indicates if the prerelease flag should be omitted during updates. The prerelease flag will still be applied for newly created releases.
This will preserve the existing prerelease state during updates.
- **owner**: Optionally specify the owner of the repo where the release should be generated. Defaults to current repo's owner.
- **prerelease**: Optionally marks this release as prerelease. Set to true to enable.
- **replacesArtifacts**: Indicates if existing release artifacts should be replaced. Defaults to `true`.
- **repo**: Optionally specify the repo where the release should be generated. Defaults to current repo.
- **tag**: An optional tag for the release. If this is omitted the git ref will be used (if it is a tag).
- **token**: (**Required**) The GitHub token. Typically this will be `${{ secrets.GITHUB_TOKEN }}`.
| Input name | Description | Required | Default Value |
|----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------|----------------------|
| allowUpdates | An optional flag which indicates if we should update a release if it already exists. Defaults to false. | false | "" |
| artifactErrorsFailBuild | An optional flag which indicates if artifact read or upload errors should fail the build. | false | "" |
| artifacts | An optional set of paths representing artifacts to upload to the release. This may be a single path or a comma delimited list of paths (or globs) | false | "" |
| artifactContentType | The content type of the artifact. Defaults to raw | false | "" |
| body | An optional body for the release. Note: This input will have white space trimmed before and after it. Use `bodyFile` if you need a non-trivial markdown body. | false | "" |
| bodyFile | An optional body file for the release. This should be the path to the file. | false | "" |
| commit | An optional commit reference. This will be used to create the tag if it does not exist. | false | "" |
| discussionCategory | When provided this will generate a discussion of the specified category. The category must exist otherwise this will cause the action to fail. This isn't used with draft releases. The default "Announcements" category is not supported via the API and will cause an error if used here. | false | "" |
| draft | Optionally marks this release as a draft release. Set to true to enable. | false | "" |
| generateReleaseNotes | Indicates if release notes should be automatically generated. | false | false |
| generateReleaseNotesPreviousTag | An optional previous tag to use when generating release notes. This will limit the release notes to changes between the two tags. | false | "" |
| immutableCreate | Indicates if immutable release creation should be used. When enabled, the action will first create a draft, upload artifacts, then publish the release. | false | false |
| makeLatest | Indicates if the release should be the "latest" release or not. legacy specifies that the latest release should be determined based on the release creation date and higher semantic version. | false | "legacy" |
| name | An optional name for the release. If this is omitted the tag will be used. | false | "" |
| omitBody | Indicates if the release body should be omitted. | false | false |
| omitBodyDuringUpdate | Indicates if the release body should be omitted during updates. The body will still be applied for newly created releases. This will preserve the existing body during updates. | false | false |
| omitDraftDuringUpdate | Indicates if the draft flag should be omitted during updates. The draft flag will still be applied for newly created releases. This will preserve the existing draft state during updates. | false | false |
| omitName | Indicates if the release name should be omitted. | false | false |
| omitNameDuringUpdate | Indicates if the release name should be omitted during updates. The name will still be applied for newly created releases. This will preserve the existing name during updates. | false | false |
| omitPrereleaseDuringUpdate | Indicates if the prerelease flag should be omitted during updates. The prerelease flag will still be applied for newly created releases. This will preserve the existing prerelease state during updates. | false | false |
| owner | Optionally specify the owner of the repo where the release should be generated. Defaults to current repo's owner. | false | "current repo owner" |
| prerelease | Optionally marks this release as prerelease. Set to true to enable. | false | "" |
| removeArtifacts | Indicates if existing release artifacts should be removed. | false | false |
| replacesArtifacts | Indicates if existing release artifacts should be replaced. | false | true |
| repo | Optionally specify the repo where the release should be generated. | false | current repo |
| skipIfReleaseExists | When skipIfReleaseExists is enabled the action will be skipped if a non-draft release already exists for the provided tag. | false | false |
| tag | An optional tag for the release. If this is omitted the git ref will be used (if it is a tag). | false | "" |
| token | The GitHub token. This will default to the GitHub app token. This is primarily useful if you want to use your personal token (for targeting other repos, etc). If you are using a personal access token it should have access to the `repo` scope. | false | github.token |
| updateOnlyUnreleased | When allowUpdates is enabled, this will fail the action if the release it is updating is not a draft or a prerelease. | false | false |
## Action Outputs
- **id**: The identifier of the created release.
- **html_url**: The HTML URL of the release.
- **upload_url**: The URL for uploading assets to the release.
| Output name | Description |
|-------------|-----------------------------------------------|
| id | The identifier of the created release. |
| html_url | The HTML URL of the release. |
| upload_url | The URL for [uploading assets](https://docs.github.com/en/rest/releases/assets?apiVersion=2022-11-28#upload-a-release-asset) to the release. |
| tarball_url | The URL for downloading the release as a tarball (.tar.gz). |
| zipball_url | The URL for downloading the release as a zipball (.zip). |
| assets | JSON string containing a map of asset names to download URLs for uploaded assets. |
## Example
This example will create a release when a tag is pushed:
@@ -47,16 +70,18 @@ jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: ncipollo/release-action@v1
with:
artifacts: "release.tar.gz,foo/*.txt"
bodyFile: "body.md"
token: ${{ secrets.GITHUB_TOKEN }}
```
## Notes
- You must provide a tag either via the action input or the git ref (i.e push / create a tag). If you do not provide a tag the action will fail.
- If the tag of the release you are creating does not yet exist, you should set both the `tag` and `commit` action inputs. `commit` can point to a commit hash or a branch name (ex - `main`).
- In the example above only required permissions for the action specified (which is `contents: write`). If you add other actions to the same workflow you should expand `permissions` block accordingly.
- More info about why the default discussion category "Announcements" does not work with this action may be found here: https://github.com/goreleaser/goreleaser/issues/2304.

87
README.zh-Hans.md Normal file
View File

@@ -0,0 +1,87 @@
# Release Action
此操作将创建一个 GitHub Release并可选择将产出文件上传到其中。
<div align="center">
<strong>
<samp>
[English](README.md) · [简体中文](README.zh-Hans.md)
</samp>
</strong>
</div>
## Action 输入
| 输入名称 | 描述 | 必选 | 默认值 |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | -------------------- |
| allowUpdates | 一个可选标志,表示如果版本已经存在,我们是否应该更新它。默认值为 false。 | false | "" |
| artifactErrorsFailBuild | 一个可选标志,表示读取或上传产出文件错误时是否应该使构建失败。 | false | "" |
| artifacts | 一组可选的路径,表示要上传到版本的产出文件。 这可能是单个路径或以逗号分隔的路径列表(或 globs | false | "" |
| artifactContentType | 产出文件的内容类型。 默认为 raw | false | "" |
| body | 发布的可选主体。注意:此处输入的首尾空格会被去除。如果您需要特殊的 markdown 内容,请使用 `bodyFile`。 | false | "" |
| bodyFile | 发布的可选正文文件。 这应该是文件的路径。 | false | "" |
| commit | 一个可选的提交 ref。 如果标签不存在,将用于创建标签。 | false | "" |
| discussionCategory | 当提供该选项时,将生成指定类别的 discussion。指定的类别必须存在否则将导致 Action 失败。这对草案状态的发布不生效。API 不支持默认的 Announcement 分类,使用这个分类会引发错误。 | false | "" |
| draft | 可选择将此版本标记为草稿版本。 设置为 true 以启用。 | false | "" |
| generateReleaseNotes | 指示是否应自动生成发行说明。 | false | false |
| immutableCreate | 指示是否应使用不可变发布创建。启用时,操作将首先创建草稿,上传产出文件,然后发布版本。 | false | false |
| makeLatest | 指示是否将这个发布设置为 latest。使用"lagecy"值则会根据发布时间和语义化版本号自动决定。 | false | "legacy" |
| name | 版本的可选名称。 如果省略,将使用标签。 | false | "" |
| omitBody | 指示是否应省略发布主体。 | false | false |
| omitBodyDuringUpdate | 指示在更新期间是否应省略发布主体。 正文仍将应用于新创建的版本。 这将在更新期间保留现有正文。 | false | false |
| omitDraftDuringUpdate | 指示是否应在更新期间省略草稿标志。 草稿标志仍将应用于新创建的版本。 这将在更新期间保留现有的草稿状态。 | false | false |
| omitName | 指示是否应省略版本名称。 | false | false |
| omitNameDuringUpdate | 指示在更新期间是否应省略版本名称。 该名称仍将应用于新创建的版本。 这将在更新期间保留现有名称。 | false | false |
| omitPrereleaseDuringUpdate | 指示在更新期间是否应省略预发布标志。 预发布标志仍将应用于新创建的版本。 这将在更新期间保留现有的预发布状态。 | false | false |
| owner | (可选)指定应在其中生成版本的存储库的所有者。 默认为当前存储库的所有者。 | false | "current repo owner" |
| prerelease | 可选择将此版本标记为预发布。 设置为 true 以启用。 | false | "" |
| removeArtifacts | 指示是否应删除现有的发布产出文件。 | false | false |
| replacesArtifacts | 指示是否应替换现有的发布产出文件。 | false | true |
| repo | (可选)指定应在其中生成版本的存储库。 | false | current repo |
| skipIfReleaseExists | 当该选项启用时,如果提供的标签已存在一个对应的非草案状态的发布,则 action 将会被跳过。 | false | false |
| tag | 发布的可选标签。 如果省略,将使用 git ref (如果它是标签)。 | false | "" |
| token | GitHub 令牌。 这将默认为 GitHub 应用程序令牌。 如果您想使用您的个人令牌(用于定位其他存储库等),这主要是有用的。 如果您使用的是个人访问令牌,它应该可以访问 `repo` 范围。 | false | github.token |
| updateOnlyUnreleased | 启用 allowUpdates 后,如果它正在更新的版本不是草稿或预发布,则该操作将失败。 | false | false |
## Action 输出
| 输出名称 | 描述 |
| ---------- | ------------------------ |
| id | 创建的版本的标识符。 |
| html_url | 版本的 HTML URL。 |
| upload_url | 将资产上传到版本的 URL。 |
## 示例
此示例将在推送一个标签时创建一个 Release
```yml
name: Releases
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: ncipollo/release-action@v1
with:
artifacts: "release.tar.gz,foo/*.txt"
bodyFile: "body.md"
```
## 注意
- 您必须通过 Action 输入或 git ref 提供一个标签(即推送/创建标签。如果不提供标签Action 将会失败。
- 如果您正在创建的版本的标签不存在,您应该同时设置标签和提交 Action 输入。 commit 可以指向提交 Hash 或分支名称(例如 - main
- 在上面的示例中,只需要指定操作的权限(即 contents: write。 如果您将其他操作添加到同一工作流程,则应相应地扩展权限。
- 有关于此 action 无法支持 discussion 的 Announcement 分类的原因的更多信息请参见此处https://github.com/goreleaser/goreleaser/issues/2304

View File

@@ -0,0 +1,9 @@
import { vi } from "vitest"
export const debug = vi.fn()
export const getBooleanInput = vi.fn()
export const getInput = vi.fn()
export const notice = vi.fn()
export const setFailed = vi.fn()
export const setOutput = vi.fn()
export const warning = vi.fn()

8
__mocks__/fs.ts Normal file
View File

@@ -0,0 +1,8 @@
import { vi } from "vitest"
export const createReadStream = vi.fn()
export const statSync = vi.fn()
export const readFileSync = vi.fn()
export const writeFileSync = vi.fn()
export const existsSync = vi.fn()
export const realpathSync = vi.fn()

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,46 @@
import { describe, expect, it, vi } from "vitest"
import { ReleaseActionSkipper } from "../src/ActionSkipper.js"
import type { Releases } from "../src/Releases.js"
describe("shouldSkip", () => {
const getMock = vi.fn()
const tag = "tag"
const MockReleases = vi.fn<() => Releases>(() => {
return {
create: vi.fn(),
deleteArtifact: vi.fn(),
getByTag: getMock,
listArtifactsForRelease: vi.fn(),
listReleases: vi.fn(),
update: vi.fn(),
uploadArtifact: vi.fn(),
generateReleaseNotes: vi.fn(),
}
})
it("should return false when skipIfReleaseExists is false", async () => {
const actionSkipper = new ReleaseActionSkipper(false, MockReleases(), tag)
expect(await actionSkipper.shouldSkip()).toBe(false)
})
it("should return false when error occurs", async () => {
getMock.mockRejectedValue(new Error())
const actionSkipper = new ReleaseActionSkipper(true, MockReleases(), tag)
expect(await actionSkipper.shouldSkip()).toBe(false)
})
it("should return false when release does not exist", async () => {
getMock.mockResolvedValue({})
const actionSkipper = new ReleaseActionSkipper(true, MockReleases(), tag)
expect(await actionSkipper.shouldSkip()).toBe(false)
})
it("should return true when release does exist", async () => {
getMock.mockResolvedValue({ data: {} })
const actionSkipper = new ReleaseActionSkipper(true, MockReleases(), tag)
expect(await actionSkipper.shouldSkip()).toBe(true)
})
})

View File

@@ -1,38 +1,43 @@
import { Artifact } from "../src/Artifact";
import * as fs from "node:fs"
import { describe, expect, it, vi } from "vitest"
import { Artifact } from "../src/Artifact.js"
vi.mock("fs")
const fileContents = Buffer.from('artful facts', 'utf-8')
const contentLength = 42
const fakeReadStream = {}
jest.mock('fs', () => {
return {
readFileSync: () => fileContents,
statSync: () => { return { size: contentLength } }
};
})
const mockCreateReadStream = vi.mocked(fs.createReadStream)
const mockStatSync = vi.mocked(fs.statSync)
// biome-ignore lint/suspicious/noExplicitAny: Mock object for testing
mockCreateReadStream.mockReturnValue(fakeReadStream as any)
// biome-ignore lint/suspicious/noExplicitAny: Partial Stats object for testing
mockStatSync.mockReturnValue({ size: contentLength } as any)
describe("Artifact", () => {
it('defaults contentType to raw', () => {
const artifact = new Artifact('')
expect(artifact.contentType).toBe('raw')
it("defaults contentType to raw", () => {
const artifact = new Artifact("")
expect(artifact.contentType).toBe("raw")
})
it('generates name from path', () => {
const artifact = new Artifact('some/artifact')
expect(artifact.name).toBe('artifact')
it("generates name from path", () => {
const artifact = new Artifact("some/artifact")
expect(artifact.name).toBe("artifact")
})
it('provides contentLength', () => {
const artifact = new Artifact('some/artifact')
it("provides contentLength", () => {
const artifact = new Artifact("some/artifact")
expect(artifact.contentLength).toBe(contentLength)
})
it('provides path', () => {
const artifact = new Artifact('some/artifact')
expect(artifact.path).toBe('some/artifact')
it("provides path", () => {
const artifact = new Artifact("some/artifact")
expect(artifact.path).toBe("some/artifact")
})
it('reads artifact', () => {
const artifact = new Artifact('some/artifact')
expect(artifact.readFile()).toBe(fileContents)
it("reads artifact", () => {
const artifact = new Artifact("some/artifact")
expect(artifact.readFile()).toBe(fakeReadStream)
})
})
})

View File

@@ -0,0 +1,88 @@
import { beforeEach, describe, expect, it, vi } from "vitest"
import { GithubArtifactDestroyer } from "../src/ArtifactDestroyer.js"
import type { Releases } from "../src/Releases.js"
const releaseId = 100
const deleteMock = vi.fn()
const listArtifactsMock = vi.fn()
describe("ArtifactDestroyer", () => {
beforeEach(() => {
deleteMock.mockClear()
listArtifactsMock.mockClear()
})
it("destroys all artifacts", async () => {
mockListWithAssets()
mockDeleteSuccess()
const destroyer = createDestroyer()
await destroyer.destroyArtifacts(releaseId)
expect(deleteMock).toHaveBeenCalledTimes(2)
})
it("destroys nothing when no artifacts found", async () => {
mockListWithoutAssets()
const destroyer = createDestroyer()
await destroyer.destroyArtifacts(releaseId)
expect(deleteMock).toHaveBeenCalledTimes(0)
})
it("throws when delete call fails", async () => {
mockListWithAssets()
mockDeleteError()
const destroyer = createDestroyer()
expect.hasAssertions()
try {
await destroyer.destroyArtifacts(releaseId)
} catch (error) {
expect(error).toEqual("error")
}
})
function createDestroyer(): GithubArtifactDestroyer {
const MockReleases = vi.fn<() => Releases>(() => {
return {
create: vi.fn(),
deleteArtifact: deleteMock,
getByTag: vi.fn(),
listArtifactsForRelease: listArtifactsMock,
listReleases: vi.fn(),
update: vi.fn(),
uploadArtifact: vi.fn(),
generateReleaseNotes: vi.fn(),
}
})
return new GithubArtifactDestroyer(MockReleases())
}
function mockDeleteError(): void {
deleteMock.mockRejectedValue("error")
}
function mockDeleteSuccess(): void {
deleteMock.mockResolvedValue({})
}
function mockListWithAssets() {
listArtifactsMock.mockResolvedValue([
{
name: "art1",
id: 1,
},
{
name: "art2",
id: 2,
},
])
}
function mockListWithoutAssets() {
listArtifactsMock.mockResolvedValue([])
}
})

View File

@@ -1,29 +1,33 @@
const warnMock = jest.fn()
import * as fs from "node:fs"
import * as core from "@actions/core"
import { beforeEach, describe, expect, it, vi } from "vitest"
import {FileArtifactGlobber} from "../src/ArtifactGlobber"
import {Globber} from "../src/Globber";
import {Artifact} from "../src/Artifact";
import untildify = require("untildify");
vi.mock("@actions/core")
vi.mock("fs")
import { Artifact } from "../src/Artifact.js"
import { FileArtifactGlobber } from "../src/ArtifactGlobber.js"
import type { Globber } from "../src/Globber.js"
import { expandTilde } from "../src/PathExpander.js"
const warnMock = vi.mocked(core.warning)
const mockStatSync = vi.mocked(fs.statSync)
// biome-ignore lint/suspicious/noExplicitAny: fs.realpathSync has overloads that are difficult to type
const mockRealpathSync = vi.mocked(fs.realpathSync as any)
const contentType = "raw"
const globMock = jest.fn()
const globMock = vi.fn()
const globResults = ["file1", "file2"]
jest.mock('@actions/core', () => {
return {warning: warnMock};
})
mockStatSync.mockReturnValue({
isDirectory(): boolean {
return false
},
// biome-ignore lint/suspicious/noExplicitAny: Partial Stats object for testing
} as any)
jest.mock('fs', () => {
return {
statSync: () => {
return {
isDirectory(): boolean {
return false
}
}
}
};
})
// biome-ignore lint/suspicious/noExplicitAny: Mock return value for testing
mockRealpathSync.mockReturnValue(false as any)
describe("ArtifactGlobber", () => {
beforeEach(() => {
@@ -33,64 +37,66 @@ describe("ArtifactGlobber", () => {
it("expands paths in which start with a ~", () => {
const globber = createArtifactGlobber()
const expectedArtifacts =
globResults.map((path) => new Artifact(path, contentType))
const expectedArtifacts = globResults.map((path) => new Artifact(path, contentType))
expect(globber.globArtifactString('~/path', 'raw', false))
.toEqual(expectedArtifacts)
expect(globMock).toBeCalledWith(untildify('~/path'))
expect(warnMock).not.toBeCalled()
expect(globber.globArtifactString("~/path", "raw", false)).toEqual(expectedArtifacts)
expect(globMock).toHaveBeenCalledWith(expandTilde("~/path"))
expect(warnMock).not.toHaveBeenCalled()
})
it("globs simple path", () => {
const globber = createArtifactGlobber()
const expectedArtifacts =
globResults.map((path) => new Artifact(path, contentType))
const expectedArtifacts = globResults.map((path) => new Artifact(path, contentType))
expect(globber.globArtifactString('path', 'raw', false))
.toEqual(expectedArtifacts)
expect(globMock).toBeCalledWith('path')
expect(warnMock).not.toBeCalled()
expect(globber.globArtifactString("path", "raw", false)).toEqual(expectedArtifacts)
expect(globMock).toHaveBeenCalledWith("path")
expect(warnMock).not.toHaveBeenCalled()
})
it("splits multiple paths", () => {
it("splits multiple paths with comma separator", () => {
const globber = createArtifactGlobber()
const expectedArtifacts =
globResults
.concat(globResults)
.map((path) => new Artifact(path, contentType))
const expectedArtifacts = globResults.concat(globResults).map((path) => new Artifact(path, contentType))
expect(globber.globArtifactString('path1,path2', 'raw', false))
.toEqual(expectedArtifacts)
expect(globMock).toBeCalledWith('path1')
expect(globMock).toBeCalledWith('path2')
expect(warnMock).not.toBeCalled()
expect(globber.globArtifactString("path1,path2", "raw", false)).toEqual(expectedArtifacts)
expect(globMock).toHaveBeenCalledWith("path1")
expect(globMock).toHaveBeenCalledWith("path2")
expect(warnMock).not.toHaveBeenCalled()
})
it("splits multiple paths with new line separator and trims start", () => {
const globber = createArtifactGlobber()
const expectedArtifacts = globResults.concat(globResults).map((path) => new Artifact(path, contentType))
expect(globber.globArtifactString("path1\n path2", "raw", false)).toEqual(expectedArtifacts)
expect(globMock).toHaveBeenCalledWith("path1")
expect(globMock).toHaveBeenCalledWith("path2")
expect(warnMock).not.toHaveBeenCalled()
})
it("warns when no glob results are produced and empty results shouldn't throw", () => {
const globber = createArtifactGlobber([])
expect(globber.globArtifactString('path', 'raw', false))
.toEqual([])
expect(warnMock).toBeCalled()
expect(globber.globArtifactString("path", "raw", false)).toEqual([])
expect(warnMock).toHaveBeenCalled()
})
it("throws when no glob results are produced and empty results shouild throw", () => {
const globber = createArtifactGlobber([])
expect(() => {
globber.globArtifactString('path', 'raw', true)
globber.globArtifactString("path", "raw", true)
}).toThrow()
})
function createArtifactGlobber(results: string[] = globResults): FileArtifactGlobber {
const MockGlobber = jest.fn<Globber, any>(() => {
const MockGlobber = vi.fn<() => Globber>(() => {
return {
glob: globMock
glob: globMock,
}
})
globMock.mockReturnValue(results)
return new FileArtifactGlobber(new MockGlobber())
return new FileArtifactGlobber(MockGlobber())
}
})
})

View File

@@ -1,21 +1,20 @@
const directoryMock = jest.fn()
const warnMock = jest.fn()
import * as fs from "node:fs"
import * as core from "@actions/core"
import { describe, expect, it, vi } from "vitest"
import {ArtifactPathValidator} from "../src/ArtifactPathValidator";
vi.mock("@actions/core")
vi.mock("fs")
const pattern = 'pattern'
import { ArtifactPathValidator } from "../src/ArtifactPathValidator.js"
jest.mock('@actions/core', () => {
return {warning: warnMock};
})
const warnMock = vi.mocked(core.warning)
const mockStatSync = vi.mocked(fs.statSync)
const directoryMock = vi.fn()
jest.mock('fs', () => {
return {
statSync: () => {
return {isDirectory: directoryMock}
}
};
})
// biome-ignore lint/suspicious/noExplicitAny: Partial Stats object for testing
mockStatSync.mockReturnValue({ isDirectory: directoryMock } as any)
const pattern = "pattern"
describe("ArtifactPathValidator", () => {
beforeEach(() => {
@@ -24,20 +23,20 @@ describe("ArtifactPathValidator", () => {
})
it("warns and filters out path which points to a directory", () => {
const paths = ['path1', 'path2']
const paths = ["path1", "path2"]
directoryMock.mockReturnValueOnce(true).mockReturnValueOnce(false)
const validator = new ArtifactPathValidator(false, paths, pattern)
const result = validator.validate()
expect(warnMock).toBeCalled()
expect(result).toEqual(['path2'])
expect(warnMock).toHaveBeenCalled()
expect(result).toEqual(["path2"])
})
it("warns when no glob results are produced and empty results shouldn't throw", () => {
const validator = new ArtifactPathValidator(false, [], pattern)
const result = validator.validate()
expect(warnMock).toBeCalled()
const _result = validator.validate()
expect(warnMock).toHaveBeenCalled()
})
it("throws when no glob results are produced and empty results shouild throw", () => {
@@ -48,7 +47,7 @@ describe("ArtifactPathValidator", () => {
})
it("throws when path points to directory", () => {
const paths = ['path1', 'path2']
const paths = ["path1", "path2"]
directoryMock.mockReturnValueOnce(true).mockReturnValueOnce(false)
const validator = new ArtifactPathValidator(true, paths, pattern)
@@ -57,4 +56,4 @@ describe("ArtifactPathValidator", () => {
validator.validate()
}).toThrow()
})
})
})

View File

@@ -1,132 +1,172 @@
import {Artifact} from "../src/Artifact"
import {GithubArtifactUploader} from "../src/ArtifactUploader"
import {Releases} from "../src/Releases";
import {RequestError} from '@octokit/request-error'
import { RequestError } from "@octokit/request-error"
import { beforeEach, describe, expect, it, vi } from "vitest"
import { Artifact } from "../src/Artifact.js"
import { GithubArtifactUploader } from "../src/ArtifactUploader.js"
import type { Releases } from "../src/Releases.js"
const artifacts = [
new Artifact('a/art1'),
new Artifact('b/art2')
]
const fileContents = Buffer.from('artful facts', 'utf-8')
const artifacts = [new Artifact("a/art1"), new Artifact("b/art2")]
const fakeReadStream = {}
const contentLength = 42
const releaseId = 100
const url = 'http://api.example.com'
const url = "http://api.example.com"
const deleteMock = jest.fn()
const listArtifactsMock = jest.fn()
const uploadMock = jest.fn()
const deleteMock = vi.fn()
const listArtifactsMock = vi.fn()
const uploadMock = vi.fn()
jest.mock('fs', () => {
return {
readFileSync: () => fileContents,
statSync: () => {
return {size: contentLength}
}
};
// Mock response with browser_download_url
const mockUploadResponse = (name: string) => ({
data: {
browser_download_url: `https://github.com/octocat/Hello-World/releases/download/v1.0.0/${name}`,
name: name,
id: 1,
},
})
describe('ArtifactUploader', () => {
vi.mock("fs", async () => {
const originalFs = await vi.importActual<typeof import("fs")>("fs")
return {
...originalFs,
promises: {},
createReadStream: () => fakeReadStream,
statSync: () => {
return { size: contentLength }
},
}
})
describe("ArtifactUploader", () => {
beforeEach(() => {
deleteMock.mockClear()
listArtifactsMock.mockClear()
uploadMock.mockClear()
})
it('abort when upload failed with non-5xx response', async () => {
it("returns asset URLs when upload succeeds", async () => {
mockListWithoutAssets()
mockUploadSuccess()
const uploader = createUploader(true)
const result = await uploader.uploadArtifacts(artifacts, releaseId, url)
expect(result).toEqual({
art1: "https://github.com/octocat/Hello-World/releases/download/v1.0.0/art1",
art2: "https://github.com/octocat/Hello-World/releases/download/v1.0.0/art2",
})
expect(uploadMock).toHaveBeenCalledTimes(2)
})
it("returns empty object when no artifacts are uploaded", async () => {
const uploader = createUploader(true)
const result = await uploader.uploadArtifacts([], releaseId, url)
expect(result).toEqual({})
expect(uploadMock).toHaveBeenCalledTimes(0)
})
it("excludes failed uploads from returned URLs", async () => {
mockListWithoutAssets()
mockUploadArtifact(401, 2)
const uploader = createUploader(true)
await uploader.uploadArtifacts(artifacts, releaseId, url)
const result = await uploader.uploadArtifacts(artifacts, releaseId, url)
expect(uploadMock).toBeCalledTimes(2)
expect(uploadMock)
.toBeCalledWith(url, contentLength, 'raw', fileContents, 'art1', releaseId)
expect(uploadMock)
.toBeCalledWith(url, contentLength, 'raw', fileContents, 'art2', releaseId)
expect(deleteMock).toBeCalledTimes(0)
expect(result).toEqual({})
expect(uploadMock).toHaveBeenCalledTimes(2)
})
it('abort when upload failed with 5xx response after 3 attempts', async () => {
it("abort when upload failed with non-5xx response", async () => {
mockListWithoutAssets()
mockUploadArtifact(401, 2)
const uploader = createUploader(true)
const result = await uploader.uploadArtifacts(artifacts, releaseId, url)
expect(result).toEqual({})
expect(uploadMock).toHaveBeenCalledTimes(2)
expect(uploadMock).toHaveBeenCalledWith(url, contentLength, "raw", fakeReadStream, "art1", releaseId)
expect(uploadMock).toHaveBeenCalledWith(url, contentLength, "raw", fakeReadStream, "art2", releaseId)
expect(deleteMock).toHaveBeenCalledTimes(0)
})
it("abort when upload failed with 5xx response after 3 attempts", async () => {
mockListWithoutAssets()
mockUploadArtifact(500, 4)
const uploader = createUploader(true)
await uploader.uploadArtifacts(artifacts, releaseId, url)
const result = await uploader.uploadArtifacts(artifacts, releaseId, url)
expect(uploadMock).toBeCalledTimes(5)
expect(uploadMock)
.toBeCalledWith(url, contentLength, 'raw', fileContents, 'art1', releaseId)
expect(uploadMock)
.toBeCalledWith(url, contentLength, 'raw', fileContents, 'art1', releaseId)
expect(uploadMock)
.toBeCalledWith(url, contentLength, 'raw', fileContents, 'art1', releaseId)
expect(uploadMock)
.toBeCalledWith(url, contentLength, 'raw', fileContents, 'art2', releaseId)
expect(uploadMock)
.toBeCalledWith(url, contentLength, 'raw', fileContents, 'art2', releaseId)
expect(result).toEqual({})
expect(uploadMock).toHaveBeenCalledTimes(5)
expect(uploadMock).toHaveBeenCalledWith(url, contentLength, "raw", fakeReadStream, "art1", releaseId)
expect(uploadMock).toHaveBeenCalledWith(url, contentLength, "raw", fakeReadStream, "art1", releaseId)
expect(uploadMock).toHaveBeenCalledWith(url, contentLength, "raw", fakeReadStream, "art1", releaseId)
expect(uploadMock).toHaveBeenCalledWith(url, contentLength, "raw", fakeReadStream, "art2", releaseId)
expect(uploadMock).toHaveBeenCalledWith(url, contentLength, "raw", fakeReadStream, "art2", releaseId)
expect(deleteMock).toBeCalledTimes(0)
expect(deleteMock).toHaveBeenCalledTimes(0)
})
it('replaces all artifacts', async () => {
it("replaces all artifacts", async () => {
mockDeleteSuccess()
mockListWithAssets()
mockUploadArtifact()
mockUploadSuccess()
const uploader = createUploader(true)
await uploader.uploadArtifacts(artifacts, releaseId, url)
const result = await uploader.uploadArtifacts(artifacts, releaseId, url)
expect(uploadMock).toBeCalledTimes(2)
expect(uploadMock)
.toBeCalledWith(url, contentLength, 'raw', fileContents, 'art1', releaseId)
expect(uploadMock)
.toBeCalledWith(url, contentLength, 'raw', fileContents, 'art2', releaseId)
expect(result).toEqual({
art1: "https://github.com/octocat/Hello-World/releases/download/v1.0.0/art1",
art2: "https://github.com/octocat/Hello-World/releases/download/v1.0.0/art2",
})
expect(uploadMock).toHaveBeenCalledTimes(2)
expect(uploadMock).toHaveBeenCalledWith(url, contentLength, "raw", fakeReadStream, "art1", releaseId)
expect(uploadMock).toHaveBeenCalledWith(url, contentLength, "raw", fakeReadStream, "art2", releaseId)
expect(deleteMock).toBeCalledTimes(2)
expect(deleteMock).toBeCalledWith(1)
expect(deleteMock).toBeCalledWith(2)
expect(deleteMock).toHaveBeenCalledTimes(2)
expect(deleteMock).toHaveBeenCalledWith(1)
expect(deleteMock).toHaveBeenCalledWith(2)
})
it('replaces no artifacts when previous asset list empty', async () => {
it("replaces no artifacts when previous asset list empty", async () => {
mockDeleteSuccess()
mockListWithoutAssets()
mockUploadArtifact()
mockUploadSuccess()
const uploader = createUploader(true)
await uploader.uploadArtifacts(artifacts, releaseId, url)
const result = await uploader.uploadArtifacts(artifacts, releaseId, url)
expect(uploadMock).toBeCalledTimes(2)
expect(uploadMock)
.toBeCalledWith(url, contentLength, 'raw', fileContents, 'art1', releaseId)
expect(uploadMock)
.toBeCalledWith(url, contentLength, 'raw', fileContents, 'art2', releaseId)
expect(result).toEqual({
art1: "https://github.com/octocat/Hello-World/releases/download/v1.0.0/art1",
art2: "https://github.com/octocat/Hello-World/releases/download/v1.0.0/art2",
})
expect(uploadMock).toHaveBeenCalledTimes(2)
expect(uploadMock).toHaveBeenCalledWith(url, contentLength, "raw", fakeReadStream, "art1", releaseId)
expect(uploadMock).toHaveBeenCalledWith(url, contentLength, "raw", fakeReadStream, "art2", releaseId)
expect(deleteMock).toBeCalledTimes(0)
expect(deleteMock).toHaveBeenCalledTimes(0)
})
it('retry when upload failed with 5xx response', async () => {
it("retry when upload failed with 5xx response", async () => {
mockListWithoutAssets()
mockUploadArtifact(500, 2)
const uploader = createUploader(true)
await uploader.uploadArtifacts(artifacts, releaseId, url)
const result = await uploader.uploadArtifacts(artifacts, releaseId, url)
expect(uploadMock).toBeCalledTimes(4)
expect(uploadMock)
.toBeCalledWith(url, contentLength, 'raw', fileContents, 'art1', releaseId)
expect(uploadMock)
.toBeCalledWith(url, contentLength, 'raw', fileContents, 'art1', releaseId)
expect(uploadMock)
.toBeCalledWith(url, contentLength, 'raw', fileContents, 'art1', releaseId)
expect(uploadMock)
.toBeCalledWith(url, contentLength, 'raw', fileContents, 'art2', releaseId)
expect(result).toEqual({})
expect(uploadMock).toHaveBeenCalledTimes(4)
expect(uploadMock).toHaveBeenCalledWith(url, contentLength, "raw", fakeReadStream, "art1", releaseId)
expect(uploadMock).toHaveBeenCalledWith(url, contentLength, "raw", fakeReadStream, "art1", releaseId)
expect(uploadMock).toHaveBeenCalledWith(url, contentLength, "raw", fakeReadStream, "art1", releaseId)
expect(uploadMock).toHaveBeenCalledWith(url, contentLength, "raw", fakeReadStream, "art2", releaseId)
expect(deleteMock).toBeCalledTimes(0)
expect(deleteMock).toHaveBeenCalledTimes(0)
})
it('throws upload error when replacesExistingArtifacts is true', async () => {
it("throws upload error when replacesExistingArtifacts is true", async () => {
mockListWithoutAssets()
mockUploadError()
const uploader = createUploader(true, true)
@@ -139,10 +179,10 @@ describe('ArtifactUploader', () => {
}
})
it('throws error from replace', async () => {
it("throws error from replace", async () => {
mockDeleteError()
mockListWithAssets()
mockUploadArtifact()
mockUploadSuccess()
const uploader = createUploader(true)
expect.hasAssertions()
@@ -153,43 +193,46 @@ describe('ArtifactUploader', () => {
}
})
it('updates all artifacts, delete none', async () => {
it("updates all artifacts, delete none", async () => {
mockDeleteError()
mockListWithAssets()
mockUploadArtifact()
mockUploadSuccess()
const uploader = createUploader(false)
await uploader.uploadArtifacts(artifacts, releaseId, url)
const result = await uploader.uploadArtifacts(artifacts, releaseId, url)
expect(uploadMock).toBeCalledTimes(2)
expect(uploadMock)
.toBeCalledWith(url, contentLength, 'raw', fileContents, 'art1', releaseId)
expect(uploadMock)
.toBeCalledWith(url, contentLength, 'raw', fileContents, 'art2', releaseId)
expect(result).toEqual({
art1: "https://github.com/octocat/Hello-World/releases/download/v1.0.0/art1",
art2: "https://github.com/octocat/Hello-World/releases/download/v1.0.0/art2",
})
expect(uploadMock).toHaveBeenCalledTimes(2)
expect(uploadMock).toHaveBeenCalledWith(url, contentLength, "raw", fakeReadStream, "art1", releaseId)
expect(uploadMock).toHaveBeenCalledWith(url, contentLength, "raw", fakeReadStream, "art2", releaseId)
expect(deleteMock).toBeCalledTimes(0)
expect(deleteMock).toHaveBeenCalledTimes(0)
})
function createUploader(replaces: boolean, throws: boolean = false): GithubArtifactUploader {
const MockReleases = jest.fn<Releases, any>(() => {
function createUploader(replaces: boolean, throws = false): GithubArtifactUploader {
const MockReleases = vi.fn<() => Releases>(() => {
return {
create: jest.fn(),
create: vi.fn(),
deleteArtifact: deleteMock,
getByTag: jest.fn(),
getByTag: vi.fn(),
listArtifactsForRelease: listArtifactsMock,
listReleases: jest.fn(),
update: jest.fn(),
uploadArtifact: uploadMock
listReleases: vi.fn(),
update: vi.fn(),
uploadArtifact: uploadMock,
generateReleaseNotes: vi.fn(),
}
})
return new GithubArtifactUploader(new MockReleases(), replaces, throws)
return new GithubArtifactUploader(MockReleases(), replaces, throws)
}
function mockDeleteError(): any {
function mockDeleteError(): void {
deleteMock.mockRejectedValue("error")
}
function mockDeleteSuccess(): any {
function mockDeleteSuccess(): void {
deleteMock.mockResolvedValue({})
}
@@ -197,12 +240,12 @@ describe('ArtifactUploader', () => {
listArtifactsMock.mockResolvedValue([
{
name: "art1",
id: 1
id: 1,
},
{
name: "art2",
id: 2
}
id: 2,
},
])
}
@@ -210,10 +253,14 @@ describe('ArtifactUploader', () => {
listArtifactsMock.mockResolvedValue([])
}
function mockUploadArtifact(status: number = 200, failures: number = 0) {
function mockUploadSuccess() {
uploadMock.mockImplementation((_, __, ___, ____, name) => Promise.resolve(mockUploadResponse(name)))
}
function mockUploadArtifact(status = 200, failures = 0) {
const error = new RequestError(`HTTP ${status}`, status, {
headers: {},
request: {method: 'GET', url: '', headers: {}}
request: { method: "GET", url: "", headers: {} },
})
for (let index = 0; index < failures; index++) {
uploadMock.mockRejectedValueOnce(error)
@@ -224,7 +271,7 @@ describe('ArtifactUploader', () => {
function mockUploadError() {
uploadMock.mockRejectedValue({
message: "error",
status: 502
status: 502,
})
}
});
})

View File

@@ -1,68 +1,96 @@
import { GithubError } from "../src/GithubError"
import { describe, expect, it } from "vitest"
import { GithubError } from "../src/GithubError.js"
describe('ErrorMessage', () => {
describe('has error with code', () => {
describe("ErrorMessage", () => {
describe("has error with code", () => {
const error = {
message: 'something bad happened',
message: "something bad happened",
errors: [
{
code: 'missing',
resource: 'release'
code: "missing",
resource: "release",
},
{
code: 'already_exists',
resource: 'release'
}
code: "already_exists",
resource: "release",
},
],
status: 422
status: 422,
}
it('does not have error', () => {
it("does not have error", () => {
const githubError = new GithubError(error)
expect(githubError.hasErrorWithCode('missing_field')).toBeFalsy()
expect(githubError.hasErrorWithCode("missing_field")).toBeFalsy()
})
it('has error', () => {
it("has error", () => {
const githubError = new GithubError(error)
expect(githubError.hasErrorWithCode('missing')).toBeTruthy()
expect(githubError.hasErrorWithCode("missing")).toBeTruthy()
})
})
it('generates message with errors', () => {
describe("has error with remediation", () => {
it("provides remediation with 404 without errors", () => {
const error = { status: 404, message: "message" }
const githubError = new GithubError(error)
expect(githubError.toString()).toBe(
"Error 404: message\nMake sure your github token has access to the repo and has permission to author releases"
)
})
it("provides remediation with 404 with errors", () => {
const error = {
message: "message",
errors: [
{
code: "missing",
resource: "release",
},
],
status: 404,
}
const githubError = new GithubError(error)
expect(githubError.toString()).toBe(
"Error 404: message\nErrors:\n- release does not exist.\nMake sure your github token has access to the repo and has permission to author releases"
)
})
})
it("generates message with errors", () => {
const error = {
message: 'something bad happened',
message: "something bad happened",
errors: [
{
code: 'missing',
resource: 'release'
code: "missing",
resource: "release",
},
{
code: 'already_exists',
resource: 'release'
}
code: "already_exists",
resource: "release",
},
],
status: 422
status: 422,
}
const githubError = new GithubError(error)
const expectedString = "Error 422: something bad happened\nErrors:\n- release does not exist.\n- release already exists."
const expectedString =
"Error 422: something bad happened\nErrors:\n- release does not exist.\n- release already exists."
expect(githubError.toString()).toBe(expectedString)
})
it('generates message without errors', () => {
it("generates message without errors", () => {
const error = {
message: 'something bad happened',
status: 422
message: "something bad happened",
status: 422,
}
const githubError = new GithubError(error)
expect(githubError.toString()).toBe('Error 422: something bad happened')
expect(githubError.toString()).toBe("Error 422: something bad happened")
})
it('provides error status', () => {
it("provides error status", () => {
const error = { status: 404 }
const githubError = new GithubError(error)
expect(githubError.status).toBe(404)

View File

@@ -1,22 +1,22 @@
import { GithubErrorDetail } from "../src/GithubErrorDetail"
import { describe, expect, it } from "vitest"
import { GithubErrorDetail } from "../src/GithubErrorDetail.js"
describe('GithubErrorDetail', () => {
it('provides error code', () => {
describe("GithubErrorDetail", () => {
it("provides error code", () => {
const error = {
code: "missing"
code: "missing",
}
const detail = new GithubErrorDetail(error)
expect(detail.code).toBe('missing')
expect(detail.code).toBe("missing")
})
it('generates missing resource error message', () => {
it("generates missing resource error message", () => {
const resource = "release"
const error = {
code: "missing",
resource: resource
resource: resource,
}
const detail = new GithubErrorDetail(error)
@@ -25,13 +25,13 @@ describe('GithubErrorDetail', () => {
expect(message).toBe(`${resource} does not exist.`)
})
it('generates missing field error message', () => {
it("generates missing field error message", () => {
const resource = "release"
const field = "body"
const error = {
code: "missing_field",
field: field,
resource: resource
resource: resource,
}
const detail = new GithubErrorDetail(error)
@@ -40,13 +40,13 @@ describe('GithubErrorDetail', () => {
expect(message).toBe(`The ${field} field on ${resource} is missing.`)
})
it('generates invalid field error message', () => {
it("generates invalid field error message", () => {
const resource = "release"
const field = "body"
const error = {
code: "invalid",
field: field,
resource: resource
resource: resource,
}
const detail = new GithubErrorDetail(error)
@@ -55,11 +55,11 @@ describe('GithubErrorDetail', () => {
expect(message).toBe(`The ${field} field on ${resource} is an invalid format.`)
})
it('generates resource already exists error message', () => {
it("generates resource already exists error message", () => {
const resource = "release"
const error = {
code: "already_exists",
resource: resource
resource: resource,
}
const detail = new GithubErrorDetail(error)
@@ -68,13 +68,13 @@ describe('GithubErrorDetail', () => {
expect(message).toBe(`${resource} already exists.`)
})
describe('generates custom error message', () => {
it('with documentation url', () => {
describe("generates custom error message", () => {
it("with documentation url", () => {
const url = "https://api.example.com"
const error = {
code: "custom",
message: "foo",
documentation_url: url
documentation_url: url,
}
const detail = new GithubErrorDetail(error)
@@ -83,16 +83,16 @@ describe('GithubErrorDetail', () => {
expect(message).toBe(`foo\nPlease see ${url}.`)
})
it('without documentation url', () => {
it("without documentation url", () => {
const error = {
code: "custom",
message: "foo"
message: "foo",
}
const detail = new GithubErrorDetail(error)
const message = detail.toString()
expect(message).toBe('foo')
expect(message).toBe("foo")
})
})
})
})

View File

@@ -1,384 +1,483 @@
const mockGetInput = jest.fn();
const mockGlob = jest.fn()
const mockReadFileSync = jest.fn();
const mockStatSync = jest.fn();
import * as fs from "node:fs"
import * as core from "@actions/core"
import type * as github from "@actions/github"
import { beforeEach, describe, expect, it, vi } from "vitest"
import {Artifact} from "../src/Artifact";
import {ArtifactGlobber} from "../src/ArtifactGlobber";
import {Context} from "@actions/github/lib/context";
import {Inputs, CoreInputs} from "../src/Inputs";
vi.mock("@actions/core")
vi.mock("fs")
const artifacts = [
new Artifact('a/art1'),
new Artifact('b/art2')
]
import { Artifact } from "../src/Artifact.js"
import type { ArtifactGlobber } from "../src/ArtifactGlobber.js"
import { CoreInputs, type Inputs } from "../src/Inputs.js"
jest.mock('@actions/core', () => {
return {getInput: mockGetInput};
})
const mockGetInput = vi.mocked(core.getInput)
const mockGetBooleanInput = vi.mocked(core.getBooleanInput)
const mockReadFileSync = vi.mocked(fs.readFileSync)
const _mockStatSync = vi.mocked(fs.statSync)
const mockExistsSync = vi.mocked(fs.existsSync)
const mockGlob = vi.fn()
jest.mock('fs', () => {
// existsSync is used by Context's constructor
// noinspection JSUnusedGlobalSymbols
return {
existsSync: () => {
return false
},
readFileSync: mockReadFileSync,
statSync: mockStatSync
};
})
// existsSync is used by Context's constructor
mockExistsSync.mockReturnValue(false)
describe('Inputs', () => {
let context: Context;
let inputs: Inputs;
const artifacts = [new Artifact("a/art1"), new Artifact("b/art2")]
describe("Inputs", () => {
let context: typeof github.context
let inputs: Inputs
beforeEach(() => {
mockGetInput.mockReset()
context = new Context()
mockGlob.mockClear()
context = {
payload: {},
eventName: "",
sha: "",
ref: "",
workflow: "",
action: "",
actor: "",
job: "",
runNumber: 0,
runId: 0,
runAttempt: 0,
apiUrl: "",
serverUrl: "",
graphqlUrl: "",
get repo() {
const repo = process.env.GITHUB_REPOSITORY || "/"
const [owner, repoName] = repo.split("/")
return { owner: owner || "", repo: repoName || "" }
},
issue: { owner: "", repo: "", number: 0 },
// biome-ignore lint/suspicious/noExplicitAny: Partial Context object for testing
} as any
inputs = new CoreInputs(createGlobber(), context)
})
it('returns targetCommit', () => {
mockGetInput.mockReturnValue('42')
expect(inputs.commit).toBe('42')
describe("commit", () => {
it("returns commit", () => {
mockGetInput.mockReturnValueOnce("commit")
expect(inputs.commit).toBe("commit")
})
it("returns undefined when omitted", () => {
mockGetInput.mockReturnValueOnce("")
expect(inputs.commit).toBeUndefined()
})
})
it('returns token', () => {
mockGetInput.mockReturnValue('42')
expect(inputs.token).toBe('42')
it("returns token", () => {
mockGetInput.mockReturnValue("42")
expect(inputs.token).toBe("42")
})
describe('allowsUpdates', () => {
it('returns false', () => {
describe("allowsUpdates", () => {
it("returns false", () => {
expect(inputs.allowUpdates).toBe(false)
})
it('returns true', () => {
mockGetInput.mockReturnValue('true')
it("returns true", () => {
mockGetInput.mockReturnValue("true")
expect(inputs.allowUpdates).toBe(true)
})
})
describe('artifactErrorsFailBuild', () => {
it('returns false', () => {
describe("artifactErrorsFailBuild", () => {
it("returns false", () => {
expect(inputs.artifactErrorsFailBuild).toBe(false)
})
it('returns true', () => {
mockGetInput.mockReturnValue('true')
it("returns true", () => {
mockGetInput.mockReturnValue("true")
expect(inputs.artifactErrorsFailBuild).toBe(true)
})
})
describe('artifacts', () => {
it('globber told to throw errors', () => {
mockGetInput.mockReturnValueOnce('art1')
.mockReturnValueOnce('contentType')
.mockReturnValueOnce('true')
describe("artifacts", () => {
it("globber told to throw errors", () => {
mockGetInput.mockReturnValueOnce("art1").mockReturnValueOnce("contentType").mockReturnValueOnce("true")
expect(inputs.artifacts).toEqual(artifacts)
expect(mockGlob).toBeCalledTimes(1)
expect(mockGlob).toBeCalledWith('art1', 'contentType', true)
expect(mockGlob).toHaveBeenCalledTimes(1)
expect(mockGlob).toHaveBeenCalledWith("art1", "contentType", true)
})
it('returns empty artifacts', () => {
mockGetInput.mockReturnValueOnce('')
.mockReturnValueOnce('')
it("returns empty artifacts", () => {
mockGetInput.mockReturnValueOnce("").mockReturnValueOnce("")
expect(inputs.artifacts).toEqual([])
expect(mockGlob).toBeCalledTimes(0)
expect(mockGlob).toHaveBeenCalledTimes(0)
})
it('returns input.artifacts', () => {
mockGetInput.mockReturnValueOnce('art1')
.mockReturnValueOnce('contentType')
.mockReturnValueOnce('false')
it("returns input.artifacts", () => {
mockGetInput.mockReturnValueOnce("art1").mockReturnValueOnce("contentType").mockReturnValueOnce("false")
expect(inputs.artifacts).toEqual(artifacts)
expect(mockGlob).toBeCalledTimes(1)
expect(mockGlob).toBeCalledWith('art1', 'contentType', false)
expect(mockGlob).toHaveBeenCalledTimes(1)
expect(mockGlob).toHaveBeenCalledWith("art1", "contentType", false)
})
it('returns input.artifacts with default contentType', () => {
mockGetInput.mockReturnValueOnce('art1')
.mockReturnValueOnce('raw')
.mockReturnValueOnce('false')
it("returns input.artifacts with default contentType", () => {
mockGetInput.mockReturnValueOnce("art1").mockReturnValueOnce("").mockReturnValueOnce("false")
expect(inputs.artifacts).toEqual(artifacts)
expect(mockGlob).toBeCalledTimes(1)
expect(mockGlob).toBeCalledWith('art1', 'raw', false)
expect(mockGlob).toHaveBeenCalledTimes(1)
expect(mockGlob).toHaveBeenCalledWith("art1", "raw", false)
})
it('returns input.artifact', () => {
mockGetInput.mockReturnValueOnce('')
.mockReturnValueOnce('art2')
.mockReturnValueOnce('contentType')
.mockReturnValueOnce('false')
it("returns input.artifact", () => {
mockGetInput
.mockReturnValueOnce("")
.mockReturnValueOnce("art2")
.mockReturnValueOnce("contentType")
.mockReturnValueOnce("false")
expect(inputs.artifacts).toEqual(artifacts)
expect(mockGlob).toBeCalledTimes(1)
expect(mockGlob).toBeCalledWith('art2', 'contentType', false)
expect(mockGlob).toHaveBeenCalledTimes(1)
expect(mockGlob).toHaveBeenCalledWith("art2", "contentType", false)
})
})
describe('createdReleaseBody', () => {
it('returns input body', () => {
mockGetInput
.mockReturnValueOnce('false')
.mockReturnValueOnce('body')
expect(inputs.createdReleaseBody).toBe('body')
describe("createdDraft", () => {
it("returns false", () => {
expect(inputs.createdDraft).toBe(false)
})
it('returns body file contents', () => {
mockGetInput
.mockReturnValueOnce('false')
.mockReturnValueOnce('')
.mockReturnValueOnce('a/path')
mockReadFileSync.mockReturnValue('file')
it("returns true", () => {
mockGetInput.mockReturnValue("true")
expect(inputs.createdDraft).toBe(true)
})
})
expect(inputs.createdReleaseBody).toBe('file')
describe("createdReleaseBody", () => {
it("returns input body", () => {
mockGetInput.mockReturnValueOnce("false").mockReturnValueOnce("body")
expect(inputs.createdReleaseBody).toBe("body")
})
it('returns empty', () => {
mockGetInput
.mockReturnValueOnce('false')
.mockReturnValueOnce('')
.mockReturnValueOnce('')
expect(inputs.createdReleaseBody).toBe('')
it("returns body file contents", () => {
mockGetInput.mockReturnValueOnce("false").mockReturnValueOnce("").mockReturnValueOnce("a/path")
mockReadFileSync.mockReturnValue("file")
expect(inputs.createdReleaseBody).toBe("file")
})
it('returns undefined when omitted', () => {
mockGetInput
.mockReturnValueOnce('true')
.mockReturnValueOnce('body')
it("returns empty", () => {
mockGetInput.mockReturnValueOnce("false").mockReturnValueOnce("").mockReturnValueOnce("")
expect(inputs.createdReleaseBody).toBe("")
})
it("returns undefined when omitted", () => {
mockGetInput.mockReturnValueOnce("true").mockReturnValueOnce("body")
expect(inputs.createdReleaseBody).toBeUndefined()
})
})
describe('createdReleaseName', () => {
it('returns input name', () => {
mockGetInput
.mockReturnValueOnce('false')
.mockReturnValueOnce('name')
expect(inputs.createdReleaseName).toBe('name')
describe("createdReleaseName", () => {
it("returns input name", () => {
mockGetInput.mockReturnValueOnce("false").mockReturnValueOnce("name")
expect(inputs.createdReleaseName).toBe("name")
})
it('returns undefined when omitted', () => {
mockGetInput
.mockReturnValueOnce('true')
.mockReturnValueOnce('name')
expect(inputs.createdReleaseBody).toBeUndefined()
it("returns undefined when omitted", () => {
mockGetInput.mockReturnValueOnce("true").mockReturnValueOnce("name")
expect(inputs.createdReleaseName).toBeUndefined()
})
it('returns tag', () => {
mockGetInput
.mockReturnValueOnce('false')
.mockReturnValueOnce('')
context.ref = 'refs/tags/sha-tag'
expect(inputs.createdReleaseName).toBe('sha-tag')
it("returns tag", () => {
mockGetInput.mockReturnValueOnce("false").mockReturnValueOnce("")
context.ref = "refs/tags/sha-tag"
expect(inputs.createdReleaseName).toBe("sha-tag")
})
})
describe('discussionCategory', () => {
it('returns category', () => {
mockGetInput.mockReturnValue('Release')
expect(inputs.discussionCategory).toBe('Release')
describe("discussionCategory", () => {
it("returns category", () => {
mockGetInput.mockReturnValue("Release")
expect(inputs.discussionCategory).toBe("Release")
})
it('returns undefined', () => {
mockGetInput.mockReturnValue('')
it("returns undefined", () => {
mockGetInput.mockReturnValue("")
expect(inputs.discussionCategory).toBe(undefined)
})
})
describe('draft', () => {
it('returns false', () => {
expect(inputs.draft).toBe(false)
describe("generateReleaseNotes", () => {
it("returns returns true", () => {
mockGetInput.mockReturnValue("true")
expect(inputs.generateReleaseNotes).toBe(true)
})
it('returns true', () => {
mockGetInput.mockReturnValue('true')
expect(inputs.draft).toBe(true)
it("returns false when omitted", () => {
mockGetInput.mockReturnValue("")
expect(inputs.generateReleaseNotes).toBe(false)
})
})
describe('owner', () => {
it('returns owner from context', function () {
describe("generateReleaseNotesPreviousTag", () => {
it("returns the previous tag when provided", () => {
mockGetInput.mockReturnValue("v1.0.0")
expect(inputs.generateReleaseNotesPreviousTag).toBe("v1.0.0")
})
it("returns undefined when omitted", () => {
mockGetInput.mockReturnValue("")
expect(inputs.generateReleaseNotesPreviousTag).toBeUndefined()
})
})
describe("immutableCreate", () => {
it("returns false by default", () => {
mockGetInput.mockReturnValue("")
expect(inputs.immutableCreate).toBe(false)
})
it("returns true when explicitly set", () => {
mockGetInput.mockReturnValue("true")
expect(inputs.immutableCreate).toBe(true)
})
it("returns false when explicitly disabled", () => {
mockGetInput.mockReturnValue("false")
expect(inputs.immutableCreate).toBe(false)
})
})
describe("makeLatest", () => {
it("returns legacy", () => {
mockGetInput.mockReturnValueOnce("legacy")
expect(inputs.makeLatest).toBe("legacy")
})
it("returns false", () => {
mockGetInput.mockReturnValueOnce("false")
expect(inputs.makeLatest).toBe("false")
})
it("returns true", () => {
mockGetInput.mockReturnValueOnce("true")
expect(inputs.makeLatest).toBe("true")
})
it("returns undefined", () => {
mockGetInput.mockReturnValueOnce("something_else")
expect(inputs.makeLatest).toBe(undefined)
})
})
describe("owner", () => {
it("returns owner from context", () => {
process.env.GITHUB_REPOSITORY = "owner/repo"
mockGetInput.mockReturnValue("")
expect(inputs.owner).toBe("owner")
});
it('returns owner from inputs', function () {
})
it("returns owner from inputs", () => {
mockGetInput.mockReturnValue("owner")
expect(inputs.owner).toBe("owner")
});
})
})
describe('createdPrerelase', () => {
it('returns false', () => {
describe("createdPrerelase", () => {
it("returns false", () => {
expect(inputs.createdPrerelease).toBe(false)
})
it('returns true', () => {
mockGetInput.mockReturnValue('true')
it("returns true", () => {
mockGetInput.mockReturnValue("true")
expect(inputs.createdPrerelease).toBe(true)
})
})
describe('replacesArtifacts', () => {
it('returns false', () => {
describe("replacesArtifacts", () => {
it("returns false", () => {
expect(inputs.replacesArtifacts).toBe(false)
})
it('returns true', () => {
mockGetInput.mockReturnValue('true')
it("returns true", () => {
mockGetInput.mockReturnValue("true")
expect(inputs.replacesArtifacts).toBe(true)
})
})
describe('repo', () => {
it('returns repo from context', function () {
describe("removeArtifacts", () => {
it("returns false", () => {
expect(inputs.removeArtifacts).toBe(false)
})
it("returns true", () => {
mockGetInput.mockReturnValue("true")
expect(inputs.removeArtifacts).toBe(true)
})
})
describe("repo", () => {
it("returns repo from context", () => {
process.env.GITHUB_REPOSITORY = "owner/repo"
mockGetInput.mockReturnValue("")
expect(inputs.repo).toBe("repo")
});
it('returns repo from inputs', function () {
})
it("returns repo from inputs", () => {
mockGetInput.mockReturnValue("repo")
expect(inputs.repo).toBe("repo")
});
})
})
describe('tag', () => {
it('returns input tag', () => {
mockGetInput.mockReturnValue('tag')
expect(inputs.tag).toBe('tag')
describe("skipIfReleaseExists", () => {
it("returns false", () => {
mockGetBooleanInput.mockReturnValue(false)
expect(inputs.skipIfReleaseExists).toBe(false)
})
it('returns context sha when input is empty', () => {
mockGetInput.mockReturnValue('')
context.ref = 'refs/tags/sha-tag'
expect(inputs.tag).toBe('sha-tag')
it("returns true", () => {
mockGetBooleanInput.mockReturnValue(true)
expect(inputs.skipIfReleaseExists).toBe(true)
})
it('returns context sha when input is null', () => {
mockGetInput.mockReturnValue(null)
context.ref = 'refs/tags/sha-tag'
expect(inputs.tag).toBe('sha-tag')
})
describe("tag", () => {
it("returns input tag", () => {
mockGetInput.mockReturnValue("tag")
expect(inputs.tag).toBe("tag")
})
it('throws if no tag', () => {
it("returns context sha when input is empty", () => {
mockGetInput.mockReturnValue("")
context.ref = "refs/tags/sha-tag"
expect(inputs.tag).toBe("sha-tag")
})
it("throws if no tag", () => {
context.ref = ""
expect(() => inputs.tag).toThrow()
})
})
describe('updatedReleaseBody', () => {
it('returns input body', () => {
mockGetInput
.mockReturnValueOnce('false')
.mockReturnValueOnce('false')
.mockReturnValueOnce('body')
expect(inputs.updatedReleaseBody).toBe('body')
describe("updatedDraft", () => {
it("returns false", () => {
expect(inputs.updatedDraft).toBe(false)
})
it('returns body file contents', () => {
mockGetInput
.mockReturnValueOnce('false')
.mockReturnValueOnce('false')
.mockReturnValueOnce('')
.mockReturnValueOnce('a/path')
mockReadFileSync.mockReturnValue('file')
expect(inputs.updatedReleaseBody).toBe('file')
it("returns true", () => {
mockGetInput.mockReturnValueOnce("false").mockReturnValue("true")
expect(inputs.updatedDraft).toBe(true)
})
it('returns empty', () => {
mockGetInput
.mockReturnValueOnce('false')
.mockReturnValueOnce('false')
.mockReturnValueOnce('')
.mockReturnValueOnce('')
expect(inputs.updatedReleaseBody).toBe('')
it("returns true when omitted is blank", () => {
mockGetInput.mockReturnValueOnce("").mockReturnValue("true")
expect(inputs.updatedDraft).toBe(true)
})
it('returns undefined when omitted', () => {
it("returns undefined when omitted for update", () => {
mockGetInput.mockReturnValueOnce("true").mockReturnValueOnce("true")
expect(inputs.updatedDraft).toBeUndefined()
})
})
describe("updatedReleaseBody", () => {
it("returns input body", () => {
mockGetInput.mockReturnValueOnce("false").mockReturnValueOnce("false").mockReturnValueOnce("body")
expect(inputs.updatedReleaseBody).toBe("body")
})
it("returns body file contents", () => {
mockGetInput
.mockReturnValueOnce('true')
.mockReturnValueOnce('false')
.mockReturnValueOnce('body')
.mockReturnValueOnce("false")
.mockReturnValueOnce("false")
.mockReturnValueOnce("")
.mockReturnValueOnce("a/path")
mockReadFileSync.mockReturnValue("file")
expect(inputs.updatedReleaseBody).toBe("file")
})
it("returns empty", () => {
mockGetInput
.mockReturnValueOnce("false")
.mockReturnValueOnce("false")
.mockReturnValueOnce("")
.mockReturnValueOnce("")
expect(inputs.updatedReleaseBody).toBe("")
})
it("returns undefined when omitted", () => {
mockGetInput.mockReturnValueOnce("true").mockReturnValueOnce("false").mockReturnValueOnce("body")
expect(inputs.updatedReleaseBody).toBeUndefined()
})
it('returns undefined when omitted for update', () => {
mockGetInput
.mockReturnValueOnce('false')
.mockReturnValueOnce('true')
.mockReturnValueOnce('body')
it("returns undefined when omitted for update", () => {
mockGetInput.mockReturnValueOnce("false").mockReturnValueOnce("true").mockReturnValueOnce("body")
expect(inputs.updatedReleaseBody).toBeUndefined()
})
})
describe('updatedReleaseName', () => {
it('returns input name', () => {
mockGetInput
.mockReturnValueOnce('false')
.mockReturnValueOnce('false')
.mockReturnValueOnce('name')
expect(inputs.updatedReleaseName).toBe('name')
describe("updatedReleaseName", () => {
it("returns input name", () => {
mockGetInput.mockReturnValueOnce("false").mockReturnValueOnce("false").mockReturnValueOnce("name")
expect(inputs.updatedReleaseName).toBe("name")
})
it('returns undefined when omitted', () => {
mockGetInput
.mockReturnValueOnce('true')
.mockReturnValueOnce('false')
.mockReturnValueOnce('name')
it("returns undefined when omitted", () => {
mockGetInput.mockReturnValueOnce("true").mockReturnValueOnce("false").mockReturnValueOnce("name")
expect(inputs.updatedReleaseName).toBeUndefined()
})
it('returns undefined when omitted for update', () => {
mockGetInput
.mockReturnValueOnce('false')
.mockReturnValueOnce('true')
.mockReturnValueOnce('name')
it("returns undefined when omitted for update", () => {
mockGetInput.mockReturnValueOnce("false").mockReturnValueOnce("true").mockReturnValueOnce("name")
expect(inputs.updatedReleaseName).toBeUndefined()
})
it('returns tag', () => {
mockGetInput
.mockReturnValueOnce('false')
.mockReturnValueOnce('false')
.mockReturnValueOnce('')
context.ref = 'refs/tags/sha-tag'
expect(inputs.updatedReleaseName).toBe('sha-tag')
it("returns tag", () => {
mockGetInput.mockReturnValueOnce("false").mockReturnValueOnce("false").mockReturnValueOnce("")
context.ref = "refs/tags/sha-tag"
expect(inputs.updatedReleaseName).toBe("sha-tag")
})
})
describe('updatedPrerelease', () => {
it('returns false', () => {
mockGetInput
.mockReturnValueOnce('false')
.mockReturnValueOnce('false')
describe("updatedPrerelease", () => {
it("returns false", () => {
mockGetInput.mockReturnValueOnce("false").mockReturnValueOnce("false")
expect(inputs.updatedPrerelease).toBe(false)
})
it('returns true', () => {
mockGetInput
.mockReturnValueOnce('false')
.mockReturnValueOnce('true')
it("returns true", () => {
mockGetInput.mockReturnValueOnce("false").mockReturnValueOnce("true")
expect(inputs.updatedPrerelease).toBe(true)
})
it('returns undefined when omitted for update', () => {
mockGetInput
.mockReturnValueOnce('true')
.mockReturnValueOnce('false')
it("returns undefined when omitted for update", () => {
mockGetInput.mockReturnValueOnce("true").mockReturnValueOnce("false")
expect(inputs.updatedPrerelease).toBeUndefined()
})
})
describe("updateOnlyUnreleased", () => {
it("returns false", () => {
expect(inputs.updateOnlyUnreleased).toBe(false)
})
it("returns true", () => {
mockGetInput.mockReturnValueOnce("true")
expect(inputs.updateOnlyUnreleased).toBe(true)
})
})
describe("omitBodyDuringUpdate", () => {
it("returns false", () => {
expect(inputs.omitBodyDuringUpdate).toBe(false)
})
it("returns true", () => {
mockGetInput.mockReturnValueOnce("true")
expect(inputs.omitBodyDuringUpdate).toBe(true)
})
})
function createGlobber(): ArtifactGlobber {
const MockGlobber = jest.fn<ArtifactGlobber, any>(() => {
const MockGlobber = vi.fn<() => ArtifactGlobber>(() => {
return {
globArtifactString: mockGlob
globArtifactString: mockGlob,
}
})
mockGlob.mockImplementation(() => artifacts)
return new MockGlobber()
return MockGlobber()
}
})

View File

@@ -1,16 +1,19 @@
import {Action} from "../src/Action";
import * as github from "@actions/github";
import {Inputs} from "../src/Inputs";
import {GithubReleases, ReleaseData} from "../src/Releases";
import {GithubArtifactUploader} from "../src/ArtifactUploader";
import * as path from "path";
import {FileArtifactGlobber} from "../src/ArtifactGlobber";
import {Outputs} from "../src/Outputs";
import * as path from "node:path"
import * as github from "@actions/github"
import { beforeEach, describe, it, vi } from "vitest"
import { Action } from "../src/Action.js"
import { ReleaseActionSkipper } from "../src/ActionSkipper.js"
import { GithubArtifactDestroyer } from "../src/ArtifactDestroyer.js"
import { FileArtifactGlobber } from "../src/ArtifactGlobber.js"
import { GithubArtifactUploader } from "../src/ArtifactUploader.js"
import type { Inputs } from "../src/Inputs.js"
import type { Outputs } from "../src/Outputs.js"
import { GithubReleases, type ReleaseData } from "../src/Releases.js"
// This test is currently intended to be manually run during development. To run:
// - Make sure you have an environment variable named GITHUB_TOKEN assigned to your token
// - Remove skip from the test below
describe.skip('Integration Test', () => {
describe.skip("Integration Test", () => {
let action: Action
beforeEach(() => {
@@ -20,57 +23,66 @@ describe.skip('Integration Test', () => {
const inputs = getInputs()
const outputs = getOutputs()
const releases = new GithubReleases(inputs, git)
const uploader = new GithubArtifactUploader(
releases,
inputs.replacesArtifacts,
inputs.artifactErrorsFailBuild,
)
action = new Action(inputs, outputs, releases, uploader)
const uploader = new GithubArtifactUploader(releases, inputs.replacesArtifacts, inputs.artifactErrorsFailBuild)
const artifactDestroyer = new GithubArtifactDestroyer(releases)
const actionSkipper = new ReleaseActionSkipper(inputs.skipIfReleaseExists, releases, inputs.tag)
action = new Action(inputs, outputs, releases, uploader, artifactDestroyer, actionSkipper)
})
it('Performs action', async () => {
it("Performs action", async () => {
await action.perform()
})
function getInputs(): Inputs {
const MockInputs = jest.fn<Inputs, any>(() => {
const MockInputs = vi.fn<() => Inputs>(() => {
return {
allowUpdates: true,
artifactErrorsFailBuild: false,
artifacts: artifacts(),
createdDraft: false,
createdReleaseBody: "This release was generated by release-action's integration test",
createdReleaseName: "Releases Action Integration Test",
commit: "",
discussionCategory: 'Release',
draft: false,
commit: undefined,
discussionCategory: "Release",
generateReleaseNotes: true,
immutableCreate: true,
omitBodyDuringUpdate: false,
owner: "ncipollo",
createdPrerelease: false,
replacesArtifacts: true,
removeArtifacts: false,
repo: "actions-playground",
skipIfReleaseExists: false,
tag: "release-action-test",
token: getToken(),
updatedReleaseBody: "This release was generated by release-action's integration test",
updatedDraft: false,
updatedReleaseBody: "This release was updated by release-action's integration test",
updatedReleaseName: "Releases Action Integration Test",
updatedPrerelease: false
updatedPrerelease: false,
updateOnlyUnreleased: false,
}
})
return new MockInputs();
return MockInputs()
}
function getOutputs(): Outputs {
const MockOutputs = jest.fn<Outputs, any>(() => {
const MockOutputs = vi.fn<() => Outputs>(() => {
return {
applyReleaseData(releaseData: ReleaseData) {
console.log(`Release Data: ${releaseData}`)
}
},
applyAssetUrls(assetUrls: Record<string, string>) {
console.log(`Asset URLs: ${JSON.stringify(assetUrls)}`)
},
}
})
return new MockOutputs()
return MockOutputs()
}
function artifacts() {
const globber = new FileArtifactGlobber()
const artifactPath = path.join(__dirname, 'Integration.test.ts')
const artifactPath = path.join(__dirname, "Integration.test.ts")
const artifactString = `~/Desktop,~/Desktop/test.txt,blarg.tx, ${artifactPath}`
return globber.globArtifactString(artifactString, "raw", false)
}
@@ -78,5 +90,4 @@ describe.skip('Integration Test', () => {
function getToken(): string {
return process.env.GITHUB_TOKEN ?? ""
}
})

View File

@@ -1,29 +1,65 @@
const mockSetOutput = jest.fn();
import * as core from "@actions/core"
import { describe, expect, it, vi } from "vitest"
import { CoreOutputs, type Outputs } from "../src/Outputs.js"
import type { ReleaseData } from "../src/Releases.js"
import {CoreOutputs, Outputs} from "../src/Outputs";
import {ReleaseData} from "../src/Releases";
vi.mock("@actions/core")
const mockSetOutput = vi.mocked(core.setOutput)
jest.mock('@actions/core', () => {
return {setOutput: mockSetOutput};
})
const TEST_URLS = {
HTML_URL: "https://api.example.com/assets",
UPLOAD_URL: "https://api.example.com",
TARBALL_URL: "https://api.example.com/tarball",
ZIPBALL_URL: "https://api.example.com/zipball",
} as const
describe('Outputs', () => {
let outputs: Outputs;
describe("Outputs", () => {
let outputs: Outputs
let releaseData: ReleaseData
beforeEach(() => {
outputs = new CoreOutputs()
releaseData = {
id: 1,
html_url: 'https://api.example.com/assets',
upload_url: 'https://api.example.com'
html_url: TEST_URLS.HTML_URL,
upload_url: TEST_URLS.UPLOAD_URL,
tarball_url: TEST_URLS.TARBALL_URL,
zipball_url: TEST_URLS.ZIPBALL_URL,
}
})
it('Applies the release data to the action output', () => {
it("Applies the release data to the action output", () => {
outputs.applyReleaseData(releaseData)
expect(mockSetOutput).toBeCalledWith('id', releaseData.id)
expect(mockSetOutput).toBeCalledWith('html_url', releaseData.html_url)
expect(mockSetOutput).toBeCalledWith('upload_url', releaseData.upload_url)
expect(mockSetOutput).toHaveBeenCalledWith("id", releaseData.id)
expect(mockSetOutput).toHaveBeenCalledWith("html_url", releaseData.html_url)
expect(mockSetOutput).toHaveBeenCalledWith("upload_url", releaseData.upload_url)
expect(mockSetOutput).toHaveBeenCalledWith("tarball_url", releaseData.tarball_url)
expect(mockSetOutput).toHaveBeenCalledWith("zipball_url", releaseData.zipball_url)
})
it("Handles null tarball_url and zipball_url", () => {
const releaseDataWithNulls = {
...releaseData,
tarball_url: null,
zipball_url: null,
}
outputs.applyReleaseData(releaseDataWithNulls)
expect(mockSetOutput).toHaveBeenCalledWith("tarball_url", "")
expect(mockSetOutput).toHaveBeenCalledWith("zipball_url", "")
})
it("Applies asset URLs to the action output", () => {
const assetUrls = {
"example.zip": "https://github.com/owner/repo/releases/download/v1.0.0/example.zip",
"example.tar.gz": "https://github.com/owner/repo/releases/download/v1.0.0/example.tar.gz",
}
outputs.applyAssetUrls(assetUrls)
expect(mockSetOutput).toHaveBeenCalledWith("assets", JSON.stringify(assetUrls))
})
it("Applies empty asset URLs to the action output", () => {
const assetUrls = {}
outputs.applyAssetUrls(assetUrls)
expect(mockSetOutput).toHaveBeenCalledWith("assets", JSON.stringify(assetUrls))
})
})

View File

@@ -0,0 +1,42 @@
import os from "node:os"
import { describe, expect, it } from "vitest"
import { expandTilde } from "../src/PathExpander.js"
describe("PathExpander", () => {
describe("expandTilde", () => {
it("expands ~ at the start of a path", () => {
const result = expandTilde("~/documents")
expect(result).toBe(`${os.homedir()}/documents`)
})
it("expands ~ with backslash separator", () => {
const result = expandTilde("~\\documents")
expect(result).toBe(`${os.homedir()}\\documents`)
})
it("expands standalone ~", () => {
const result = expandTilde("~")
expect(result).toBe(os.homedir())
})
it("does not expand ~ in the middle of a path", () => {
const result = expandTilde("/home/~user/documents")
expect(result).toBe("/home/~user/documents")
})
it("does not expand ~username patterns", () => {
const result = expandTilde("~username/documents")
expect(result).toBe("~username/documents")
})
it("returns path unchanged when no tilde present", () => {
const result = expandTilde("/absolute/path")
expect(result).toBe("/absolute/path")
})
it("returns relative path unchanged", () => {
const result = expandTilde("relative/path")
expect(result).toBe("relative/path")
})
})
})

View File

@@ -0,0 +1,75 @@
import { describe, expect, it } from "vitest"
import { ReleaseValidator } from "../src/ReleaseValidator.js"
describe("validateReleaseUpdate", () => {
describe("updateOnlyUnreleased is disabled", () => {
const validator = new ReleaseValidator(false)
it("should not throw", () => {
const releaseResponse = {
draft: false,
prerelease: false,
name: "Name",
}
expect(() => {
validator.validateReleaseUpdate(releaseResponse)
}).not.toThrow()
})
})
describe("updateOnlyUnreleased is enabled", () => {
const validator = new ReleaseValidator(true)
it("should throw if neither draft or prerelease are enabled", () => {
const releaseResponse = {
draft: false,
prerelease: false,
name: "Name",
}
expect(() => {
validator.validateReleaseUpdate(releaseResponse)
}).toThrow()
})
it("should not throw if draft is enabled", () => {
const releaseResponse = {
draft: true,
prerelease: false,
name: "Name",
}
expect(() => {
validator.validateReleaseUpdate(releaseResponse)
}).not.toThrow()
})
it("should not throw if prerelease is enabled", () => {
const releaseResponse = {
draft: false,
prerelease: true,
name: "Name",
}
expect(() => {
validator.validateReleaseUpdate(releaseResponse)
}).not.toThrow()
})
it("should not throw if draft & prerelease is enabled", () => {
const releaseResponse = {
draft: true,
prerelease: true,
name: "Name",
}
expect(() => {
validator.validateReleaseUpdate(releaseResponse)
}).not.toThrow()
})
it("should default error message release name to release", () => {
const releaseResponse = {
draft: false,
prerelease: false,
name: null,
}
expect(() => {
validator.validateReleaseUpdate(releaseResponse)
}).toThrow(`Tried to update "release" which is neither a draft or prerelease. (updateOnlyUnreleased is on)`)
})
})
})

View File

@@ -43,6 +43,22 @@ inputs:
description: "Optionally marks this release as a draft release. Set to true to enable."
required: false
default: ''
generateReleaseNotes:
description: 'Indicates if release notes should be automatically generated.'
required: false
default: 'false'
generateReleaseNotesPreviousTag:
description: 'An optional previous tag to use when generating release notes. This will limit the release notes to changes between the two tags.'
required: false
default: ''
immutableCreate:
description: 'Indicates if immutable release creation should be used. When enabled, the action will first create a draft, upload artifacts, then publish the release.'
required: false
default: 'false'
makeLatest:
description: 'Indicates if the release should be the "latest" release or not.'
required: false
default: 'legacy'
name:
description: 'An optional name for the release. If this is omitted the tag will be used.'
required: false
@@ -55,6 +71,10 @@ inputs:
description: 'Indicates if the release body should be omitted during updates. The body will still be applied for newly created releases. This will preserve the existing body during updates.'
required: false
default: 'false'
omitDraftDuringUpdate:
description: 'Indicates if the draft flag should be omitted during updates. The draft flag will still be applied for newly created releases. This will preserve the existing draft state during updates.'
required: false
default: 'false'
omitName:
description: 'Indicates if the release name should be omitted.'
required: false
@@ -75,6 +95,10 @@ inputs:
description: "Optionally marks this release as prerelease. Set to true to enable."
required: false
default: ''
removeArtifacts:
description: 'Indicates if existing release artifacts should be removed, Defaults to false.'
required: false
default: 'false'
replacesArtifacts:
description: "Indicates if existing release artifacts should be replaced. Defaults to true."
required: false
@@ -82,15 +106,23 @@ inputs:
repo:
description: "Optionally specify the repo where the release should be generated. Defaults to current repo"
required: false
default: ''
default: ''
skipIfReleaseExists:
description: "When skipIfReleaseExists is enabled the action will be skipped if a non-draft release already exists for the provided tag."
required: false
default: 'false'
tag:
description: 'An optional tag for the release. If this is omitted the git ref will be used (if it is a tag).'
required: false
default: ''
token:
description: 'The Github token.'
required: true
default: ''
required: false
default: ${{ github.token }}
updateOnlyUnreleased:
description: "When allowUpdates is enabled, this will fail the action if the release it is updating is not a draft or a prerelease."
required: false
default: 'false'
outputs:
id:
description: 'The identifier of the created release.'
@@ -98,9 +130,15 @@ outputs:
description: 'The HTML URL of the release.'
upload_url:
description: 'The URL for uploading assets to the release.'
tarball_url:
description: 'The URL for downloading the release as a tarball (.tar.gz).'
zipball_url:
description: 'The URL for downloading the release as a zipball (.zip).'
assets:
description: 'JSON string containing a map of asset names to download URLs for uploaded assets.'
runs:
using: 'node12'
main: 'lib/Main.js'
using: 'node24'
main: 'dist/index.js'
branding:
icon: 'tag'
color: 'gray-dark'

35
biome.json Normal file
View File

@@ -0,0 +1,35 @@
{
"$schema": "https://biomejs.dev/schemas/2.3.13/schema.json",
"vcs": {
"enabled": false,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": false,
"includes": ["**", "!**/node_modules/**/*", "!**/dist/"]
},
"formatter": {
"enabled": true,
"formatWithErrors": false,
"indentStyle": "space",
"lineEnding": "lf",
"indentWidth": 4,
"lineWidth": 120
},
"assist": { "actions": { "source": { "organizeImports": "on" } } },
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"javascript": {
"formatter": {
"quoteStyle": "double",
"trailingCommas": "es5",
"semicolons": "asNeeded",
"indentWidth": 4
}
}
}

45933
dist/index.js vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/index.js.map vendored Normal file

File diff suppressed because one or more lines are too long

603
dist/licenses.txt vendored Normal file
View File

@@ -0,0 +1,603 @@
@actions/core
MIT
The MIT License (MIT)
Copyright 2019 GitHub
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@actions/exec
MIT
The MIT License (MIT)
Copyright 2019 GitHub
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@actions/github
MIT
The MIT License (MIT)
Copyright 2019 GitHub
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@actions/http-client
MIT
Actions Http Client for Node.js
Copyright (c) GitHub, Inc.
All rights reserved.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@actions/io
MIT
The MIT License (MIT)
Copyright 2019 GitHub
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@octokit/auth-token
MIT
The MIT License
Copyright (c) 2019 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@octokit/core
MIT
The MIT License
Copyright (c) 2019 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@octokit/endpoint
MIT
The MIT License
Copyright (c) 2018 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@octokit/graphql
MIT
The MIT License
Copyright (c) 2018 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@octokit/plugin-paginate-rest
MIT
MIT License Copyright (c) 2019 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@octokit/plugin-rest-endpoint-methods
MIT
MIT License Copyright (c) 2019 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@octokit/request
MIT
The MIT License
Copyright (c) 2018 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@octokit/request-error
MIT
The MIT License
Copyright (c) 2019 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
before-after-hook
Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2018 Gregor Martynus and other contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
fast-content-type-parse
MIT
MIT License
Copyright (c) 2023 The Fastify Team
The Fastify team members are listed at https://github.com/fastify/fastify#team
and in the README file.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
glob
BlueOak-1.0.0
All packages under `src/` are licensed according to the terms in
their respective `LICENSE` or `LICENSE.md` files.
The remainder of this project is licensed under the Blue Oak
Model License, as follows:
-----
# Blue Oak Model License
Version 1.0.0
## Purpose
This license gives everyone as much permission to work with
this software as possible, while protecting contributors
from liability.
## Acceptance
In order to receive this license, you must agree to its
rules. The rules of this license are both obligations
under that agreement and conditions to your license.
You must not do anything with this software that triggers
a rule that you cannot or will not follow.
## Copyright
Each contributor licenses you to do everything with this
software that would otherwise infringe that contributor's
copyright in it.
## Notices
You must ensure that everyone who gets a copy of
any part of this software from you, with or without
changes, also gets the text of this license or a link to
<https://blueoakcouncil.org/license/1.0.0>.
## Excuse
If anyone notifies you in writing that you have not
complied with [Notices](#notices), you can keep your
license by taking all practical steps to comply within 30
days after the notice. If you do not do so, your license
ends immediately.
## Patent
Each contributor licenses you to do everything with this
software that would otherwise infringe any patent claims
they can license or become able to license.
## Reliability
No contributor can revoke this license.
## No Liability
***As far as the law allows, this software comes as is,
without any warranty or condition, and no contributor
will be liable to anyone for any damages related to this
software or this license, under any kind of legal claim.***
tunnel
MIT
The MIT License (MIT)
Copyright (c) 2012 Koichi Kobayashi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
undici
MIT
MIT License
Copyright (c) Matteo Collina and Undici contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
universal-user-agent
ISC
# [ISC License](https://spdx.org/licenses/ISC)
Copyright (c) 2018-2021, Gregor Martynus (https://github.com/gr2m)
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

3
dist/package.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"type": "module"
}

1
dist/sourcemap-register.cjs vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/sourcemap-register.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -1,11 +0,0 @@
module.exports = {
clearMocks: true,
moduleFileExtensions: ['js', 'ts'],
testEnvironment: 'node',
testMatch: ['**/*.test.ts'],
testRunner: 'jest-circus/runner',
transform: {
'^.+\\.ts$': 'ts-jest'
},
verbose: true
}

View File

@@ -1,96 +0,0 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Action = void 0;
const GithubError_1 = require("./GithubError");
class Action {
constructor(inputs, outputs, releases, uploader) {
this.inputs = inputs;
this.outputs = outputs;
this.releases = releases;
this.uploader = uploader;
}
perform() {
return __awaiter(this, void 0, void 0, function* () {
const releaseResponse = yield this.createOrUpdateRelease();
const releaseData = releaseResponse.data;
const releaseId = releaseData.id;
const uploadUrl = releaseData.upload_url;
const artifacts = this.inputs.artifacts;
if (artifacts.length > 0) {
yield this.uploader.uploadArtifacts(artifacts, releaseId, uploadUrl);
}
this.outputs.applyReleaseData(releaseData);
});
}
createOrUpdateRelease() {
return __awaiter(this, void 0, void 0, function* () {
if (this.inputs.allowUpdates) {
let getResponse;
try {
getResponse = yield this.releases.getByTag(this.inputs.tag);
}
catch (error) {
return yield this.checkForMissingReleaseError(error);
}
return yield this.updateRelease(getResponse.data.id);
}
else {
return yield this.createRelease();
}
});
}
checkForMissingReleaseError(error) {
return __awaiter(this, void 0, void 0, function* () {
if (Action.noPublishedRelease(error)) {
return yield this.updateDraftOrCreateRelease();
}
else {
throw error;
}
});
}
updateRelease(id) {
return __awaiter(this, void 0, void 0, function* () {
return yield this.releases.update(id, this.inputs.tag, this.inputs.updatedReleaseBody, this.inputs.commit, this.inputs.discussionCategory, this.inputs.draft, this.inputs.updatedReleaseName, this.inputs.updatedPrerelease);
});
}
static noPublishedRelease(error) {
const githubError = new GithubError_1.GithubError(error);
return githubError.status == 404;
}
updateDraftOrCreateRelease() {
return __awaiter(this, void 0, void 0, function* () {
const draftReleaseId = yield this.findMatchingDraftReleaseId();
if (draftReleaseId) {
return yield this.updateRelease(draftReleaseId);
}
else {
return yield this.createRelease();
}
});
}
findMatchingDraftReleaseId() {
return __awaiter(this, void 0, void 0, function* () {
const tag = this.inputs.tag;
const response = yield this.releases.listReleases();
const releases = response.data;
const draftRelease = releases.find(release => release.draft && release.tag_name == tag);
return draftRelease === null || draftRelease === void 0 ? void 0 : draftRelease.id;
});
}
createRelease() {
return __awaiter(this, void 0, void 0, function* () {
return yield this.releases.create(this.inputs.tag, this.inputs.createdReleaseBody, this.inputs.commit, this.inputs.discussionCategory, this.inputs.draft, this.inputs.createdReleaseName, this.inputs.createdPrerelease);
});
}
}
exports.Action = Action;

View File

@@ -1,19 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Artifact = void 0;
const path_1 = require("path");
const fs_1 = require("fs");
class Artifact {
constructor(path, contentType = "raw") {
this.path = path;
this.name = path_1.basename(path);
this.contentType = contentType;
}
get contentLength() {
return fs_1.statSync(this.path).size;
}
readFile() {
return fs_1.readFileSync(this.path);
}
}
exports.Artifact = Artifact;

View File

@@ -1,69 +0,0 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.FileArtifactGlobber = void 0;
const core = __importStar(require("@actions/core"));
const Globber_1 = require("./Globber");
const Artifact_1 = require("./Artifact");
const untildify_1 = __importDefault(require("untildify"));
const ArtifactPathValidator_1 = require("./ArtifactPathValidator");
class FileArtifactGlobber {
constructor(globber = new Globber_1.FileGlobber()) {
this.globber = globber;
}
globArtifactString(artifact, contentType, errorsFailBuild) {
return artifact.split(',')
.map(path => FileArtifactGlobber.expandPath(path))
.map(pattern => this.globPattern(pattern, errorsFailBuild))
.map((globResult) => FileArtifactGlobber.validatePattern(errorsFailBuild, globResult[1], globResult[0]))
.reduce((accumulated, current) => accumulated.concat(current))
.map(path => new Artifact_1.Artifact(path, contentType));
}
globPattern(pattern, errorsFailBuild) {
const paths = this.globber.glob(pattern);
if (paths.length == 0) {
if (errorsFailBuild) {
FileArtifactGlobber.throwGlobError(pattern);
}
else {
FileArtifactGlobber.reportGlobWarning(pattern);
}
}
return [pattern, paths];
}
static validatePattern(errorsFailBuild, paths, pattern) {
const validator = new ArtifactPathValidator_1.ArtifactPathValidator(errorsFailBuild, paths, pattern);
return validator.validate();
}
static reportGlobWarning(pattern) {
core.warning(`Artifact pattern :${pattern} did not match any files`);
}
static throwGlobError(pattern) {
throw Error(`Artifact pattern :${pattern} did not match any files`);
}
static expandPath(path) {
return untildify_1.default(path);
}
}
exports.FileArtifactGlobber = FileArtifactGlobber;

View File

@@ -1,58 +0,0 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ArtifactPathValidator = void 0;
const core = __importStar(require("@actions/core"));
const fs_1 = require("fs");
class ArtifactPathValidator {
constructor(errorsFailBuild, paths, pattern) {
this.paths = paths;
this.pattern = pattern;
this.errorsFailBuild = errorsFailBuild;
}
validate() {
this.verifyPathsNotEmpty();
return this.paths.filter((path) => this.verifyNotDirectory(path));
}
verifyPathsNotEmpty() {
if (this.paths.length == 0) {
const message = `Artifact pattern:${this.pattern} did not match any files`;
this.reportError(message);
}
}
verifyNotDirectory(path) {
const isDir = fs_1.statSync(path).isDirectory();
if (isDir) {
const message = `Artifact is a directory:${path}. Directories can not be uploaded to a release.`;
this.reportError(message);
}
return !isDir;
}
reportError(message) {
if (this.errorsFailBuild) {
throw Error(message);
}
else {
core.warning(message);
}
}
}
exports.ArtifactPathValidator = ArtifactPathValidator;

View File

@@ -1,88 +0,0 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.GithubArtifactUploader = void 0;
const core = __importStar(require("@actions/core"));
class GithubArtifactUploader {
constructor(releases, replacesExistingArtifacts = true, throwsUploadErrors = false) {
this.releases = releases;
this.replacesExistingArtifacts = replacesExistingArtifacts;
this.throwsUploadErrors = throwsUploadErrors;
}
uploadArtifacts(artifacts, releaseId, uploadUrl) {
return __awaiter(this, void 0, void 0, function* () {
if (this.replacesExistingArtifacts) {
yield this.deleteUpdatedArtifacts(artifacts, releaseId);
}
for (const artifact of artifacts) {
yield this.uploadArtifact(artifact, releaseId, uploadUrl);
}
});
}
uploadArtifact(artifact, releaseId, uploadUrl, retry = 3) {
return __awaiter(this, void 0, void 0, function* () {
try {
core.debug(`Uploading artifact ${artifact.name}...`);
yield this.releases.uploadArtifact(uploadUrl, artifact.contentLength, artifact.contentType, artifact.readFile(), artifact.name, releaseId);
}
catch (error) {
if (error.status >= 500 && retry > 0) {
core.warning(`Failed to upload artifact ${artifact.name}. ${error.message}. Retrying...`);
yield this.uploadArtifact(artifact, releaseId, uploadUrl, retry - 1);
}
else {
if (this.throwsUploadErrors) {
throw Error(`Failed to upload artifact ${artifact.name}. ${error.message}.`);
}
else {
core.warning(`Failed to upload artifact ${artifact.name}. ${error.message}.`);
}
}
}
});
}
deleteUpdatedArtifacts(artifacts, releaseId) {
return __awaiter(this, void 0, void 0, function* () {
const releaseAssets = yield this.releases.listArtifactsForRelease(releaseId);
const assetByName = {};
releaseAssets.forEach(asset => {
assetByName[asset.name] = asset;
});
for (const artifact of artifacts) {
const asset = assetByName[artifact.name];
if (asset) {
core.debug(`Deleting existing artifact ${artifact.name}...`);
yield this.releases.deleteArtifact(asset.id);
}
}
});
}
}
exports.GithubArtifactUploader = GithubArtifactUploader;

View File

@@ -1,40 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GithubError = void 0;
const GithubErrorDetail_1 = require("./GithubErrorDetail");
class GithubError {
constructor(error) {
this.error = error;
this.githubErrors = this.generateGithubErrors();
}
generateGithubErrors() {
const errors = this.error.errors;
if (errors instanceof Array) {
return errors.map((err) => new GithubErrorDetail_1.GithubErrorDetail(err));
}
else {
return [];
}
}
get status() {
return this.error.status;
}
hasErrorWithCode(code) {
return this.githubErrors.some((err) => err.code == code);
}
toString() {
const message = this.error.message;
const errors = this.githubErrors;
const status = this.status;
if (errors.length > 0) {
return `Error ${status}: ${message}\nErrors:\n${this.errorBulletedList(errors)}`;
}
else {
return `Error ${status}: ${message}`;
}
}
errorBulletedList(errors) {
return errors.map((err) => `- ${err}`).join("\n");
}
}
exports.GithubError = GithubError;

View File

@@ -1,57 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GithubErrorDetail = void 0;
class GithubErrorDetail {
constructor(error) {
this.error = error;
}
get code() {
return this.error.code;
}
toString() {
const code = this.error.code;
switch (code) {
case 'missing':
return this.missingResourceMessage();
case 'missing_field':
return this.missingFieldMessage();
case 'invalid':
return this.invalidFieldMessage();
case 'already_exists':
return this.resourceAlreadyExists();
default:
return this.customErrorMessage();
}
}
customErrorMessage() {
const message = this.error.message;
const documentation = this.error.documentation_url;
let documentationMessage;
if (documentation) {
documentationMessage = `\nPlease see ${documentation}.`;
}
else {
documentationMessage = "";
}
return `${message}${documentationMessage}`;
}
invalidFieldMessage() {
const resource = this.error.resource;
const field = this.error.field;
return `The ${field} field on ${resource} is an invalid format.`;
}
missingResourceMessage() {
const resource = this.error.resource;
return `${resource} does not exist.`;
}
missingFieldMessage() {
const resource = this.error.resource;
const field = this.error.field;
return `The ${field} field on ${resource} is missing.`;
}
resourceAlreadyExists() {
const resource = this.error.resource;
return `${resource} already exists.`;
}
}
exports.GithubErrorDetail = GithubErrorDetail;

View File

@@ -1,10 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FileGlobber = void 0;
const glob_1 = require("glob");
class FileGlobber {
glob(pattern) {
return new glob_1.GlobSync(pattern, { mark: true }).found;
}
}
exports.FileGlobber = FileGlobber;

View File

@@ -1,166 +0,0 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CoreInputs = void 0;
const core = __importStar(require("@actions/core"));
const fs_1 = require("fs");
class CoreInputs {
constructor(artifactGlobber, context) {
this.artifactGlobber = artifactGlobber;
this.context = context;
}
get allowUpdates() {
const allow = core.getInput('allowUpdates');
return allow == 'true';
}
get artifacts() {
let artifacts = core.getInput('artifacts');
if (!artifacts) {
artifacts = core.getInput('artifact');
}
if (artifacts) {
let contentType = core.getInput('artifactContentType');
if (!contentType) {
contentType = 'raw';
}
return this.artifactGlobber
.globArtifactString(artifacts, contentType, this.artifactErrorsFailBuild);
}
return [];
}
get artifactErrorsFailBuild() {
const allow = core.getInput('artifactErrorsFailBuild');
return allow == 'true';
}
get createdReleaseBody() {
if (CoreInputs.omitBody)
return undefined;
return this.body;
}
static get omitBody() {
return core.getInput('omitBody') == 'true';
}
get body() {
const body = core.getInput('body');
if (body) {
return body;
}
const bodyFile = core.getInput('bodyFile');
if (bodyFile) {
return this.stringFromFile(bodyFile);
}
return '';
}
get commit() {
return core.getInput('commit');
}
get createdReleaseName() {
if (CoreInputs.omitName)
return undefined;
return this.name;
}
get discussionCategory() {
const category = core.getInput('discussionCategory');
if (category) {
return category;
}
return undefined;
}
static get omitName() {
return core.getInput('omitName') == 'true';
}
get name() {
const name = core.getInput('name');
if (name) {
return name;
}
return this.tag;
}
get draft() {
const draft = core.getInput('draft');
return draft == 'true';
}
get owner() {
let owner = core.getInput('owner');
if (owner) {
return owner;
}
return this.context.repo.owner;
}
get createdPrerelease() {
const preRelease = core.getInput('prerelease');
return preRelease == 'true';
}
static get omitPrereleaseDuringUpdate() {
return core.getInput('omitPrereleaseDuringUpdate') == 'true';
}
get updatedPrerelease() {
if (CoreInputs.omitPrereleaseDuringUpdate)
return undefined;
return this.createdPrerelease;
}
get replacesArtifacts() {
const replaces = core.getInput('replacesArtifacts');
return replaces == 'true';
}
get repo() {
let repo = core.getInput('repo');
if (repo) {
return repo;
}
return this.context.repo.repo;
}
get tag() {
const tag = core.getInput('tag');
if (tag) {
return tag;
}
const ref = this.context.ref;
const tagPath = "refs/tags/";
if (ref && ref.startsWith(tagPath)) {
return ref.substr(tagPath.length, ref.length);
}
throw Error("No tag found in ref or input!");
}
get token() {
return core.getInput('token', { required: true });
}
get updatedReleaseBody() {
if (CoreInputs.omitBody || CoreInputs.omitBodyDuringUpdate)
return undefined;
return this.body;
}
static get omitBodyDuringUpdate() {
return core.getInput('omitBodyDuringUpdate') == 'true';
}
get updatedReleaseName() {
if (CoreInputs.omitName || CoreInputs.omitNameDuringUpdate)
return undefined;
return this.name;
}
static get omitNameDuringUpdate() {
return core.getInput('omitNameDuringUpdate') == 'true';
}
stringFromFile(path) {
return fs_1.readFileSync(path, 'utf-8');
}
}
exports.CoreInputs = CoreInputs;

View File

@@ -1,63 +0,0 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
const github = __importStar(require("@actions/github"));
const core = __importStar(require("@actions/core"));
const Inputs_1 = require("./Inputs");
const Releases_1 = require("./Releases");
const Action_1 = require("./Action");
const ArtifactUploader_1 = require("./ArtifactUploader");
const ArtifactGlobber_1 = require("./ArtifactGlobber");
const GithubError_1 = require("./GithubError");
const Outputs_1 = require("./Outputs");
function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
const action = createAction();
yield action.perform();
}
catch (error) {
const githubError = new GithubError_1.GithubError(error);
core.setFailed(githubError.toString());
}
});
}
function createAction() {
const token = core.getInput('token');
const context = github.context;
const git = github.getOctokit(token);
const globber = new ArtifactGlobber_1.FileArtifactGlobber();
const inputs = new Inputs_1.CoreInputs(globber, context);
const outputs = new Outputs_1.CoreOutputs();
const releases = new Releases_1.GithubReleases(inputs, git);
const uploader = new ArtifactUploader_1.GithubArtifactUploader(releases, inputs.replacesArtifacts, inputs.artifactErrorsFailBuild);
return new Action_1.Action(inputs, outputs, releases, uploader);
}
run();

View File

@@ -1,31 +0,0 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CoreOutputs = void 0;
const core = __importStar(require("@actions/core"));
class CoreOutputs {
applyReleaseData(releaseData) {
core.setOutput('id', releaseData.id);
core.setOutput('html_url', releaseData.html_url);
core.setOutput('upload_url', releaseData.upload_url);
}
}
exports.CoreOutputs = CoreOutputs;

View File

@@ -1,103 +0,0 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.GithubReleases = void 0;
class GithubReleases {
constructor(inputs, git) {
this.inputs = inputs;
this.git = git;
}
create(tag, body, commitHash, discussionCategory, draft, name, prerelease) {
return __awaiter(this, void 0, void 0, function* () {
// noinspection TypeScriptValidateJSTypes
return this.git.rest.repos.createRelease({
body: body,
name: name,
discussion_category_name: discussionCategory,
draft: draft,
owner: this.inputs.owner,
prerelease: prerelease,
repo: this.inputs.repo,
target_commitish: commitHash,
tag_name: tag
});
});
}
deleteArtifact(assetId) {
return __awaiter(this, void 0, void 0, function* () {
return this.git.rest.repos.deleteReleaseAsset({
asset_id: assetId,
owner: this.inputs.owner,
repo: this.inputs.repo
});
});
}
getByTag(tag) {
return __awaiter(this, void 0, void 0, function* () {
return this.git.rest.repos.getReleaseByTag({
owner: this.inputs.owner,
repo: this.inputs.repo,
tag: tag
});
});
}
listArtifactsForRelease(releaseId) {
return __awaiter(this, void 0, void 0, function* () {
return this.git.paginate(this.git.rest.repos.listReleaseAssets, {
owner: this.inputs.owner,
release_id: releaseId,
repo: this.inputs.repo
});
});
}
listReleases() {
return __awaiter(this, void 0, void 0, function* () {
return this.git.rest.repos.listReleases({
owner: this.inputs.owner,
repo: this.inputs.repo
});
});
}
update(id, tag, body, commitHash, discussionCategory, draft, name, prerelease) {
return __awaiter(this, void 0, void 0, function* () {
// noinspection TypeScriptValidateJSTypes
return this.git.rest.repos.updateRelease({
release_id: id,
body: body,
name: name,
discussion_category_name: discussionCategory,
draft: draft,
owner: this.inputs.owner,
prerelease: prerelease,
repo: this.inputs.repo,
target_commitish: commitHash,
tag_name: tag
});
});
}
uploadArtifact(assetUrl, contentLength, contentType, file, name, releaseId) {
return __awaiter(this, void 0, void 0, function* () {
return this.git.rest.repos.uploadReleaseAsset({
url: assetUrl,
headers: {
"content-length": contentLength,
"content-type": contentType
},
data: file,
name: name,
owner: this.inputs.owner,
release_id: releaseId,
repo: this.inputs.repo
});
});
}
}
exports.GithubReleases = GithubReleases;

View File

@@ -1,40 +1,53 @@
{
"name": "release-action",
"version": "1.1.0",
"private": true,
"description": "An action which manages a github release",
"main": "lib/main.js",
"scripts": {
"build": "tsc",
"clean": "rm -rf lib/*",
"debug": "yarn clean && yarn install && yarn build",
"release": "yarn clean && yarn install --production && yarn build",
"test": "jest"
},
"repository": {
"type": "git",
"url": "git+https://github.com/ncipollo/release-action.git"
},
"keywords": [
"actions",
"node",
"setup"
],
"author": "GitHub",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.4.0",
"@actions/github": "^5.0.0",
"@types/glob": "^7.1.4",
"glob": "^7.1.7",
"untildify": "^4.0.0"
},
"devDependencies": {
"@types/jest": "^26.0.24",
"@types/node": "^16.4.12",
"jest": "^26.6.3",
"jest-circus": "^27.0.6",
"ts-jest": "^26.5.6",
"typescript": "^4.3.5"
}
"name": "release-action",
"version": "1.1.0",
"type": "module",
"private": true,
"description": "An action which manages a github release",
"main": "lib/src/Main.js",
"scripts": {
"build": "tsc",
"clean": "rm -rf lib/*",
"coverage": "vitest run --coverage",
"debug": "pnpm clean && pnpm install && pnpm build && pnpm package",
"format": "pnpm biome format --write .",
"package": "ncc build --source-map --license licenses.txt",
"release": "pnpm clean && pnpm install && pnpm build && pnpm package",
"test": "vitest run"
},
"repository": {
"type": "git",
"url": "git+https://github.com/ncipollo/release-action.git"
},
"keywords": [
"actions",
"node",
"setup"
],
"author": "GitHub",
"license": "MIT",
"engines": {
"node": ">=20"
},
"dependencies": {
"@actions/core": "^3.0.0",
"@actions/github": "^9.0.0",
"@types/node": "^25.1.0",
"glob": "^13.0.6"
},
"pnpm": {
"overrides": {
"undici": ">=6.24.0"
}
},
"devDependencies": {
"@biomejs/biome": "2.4.4",
"@octokit/plugin-rest-endpoint-methods": "^10.4.1",
"@octokit/request-error": "^7.1.0",
"@octokit/types": "^16.0.0",
"@vercel/ncc": "^0.38.4",
"@vitest/coverage-v8": "^4.1.0",
"typescript": "^5.9.3",
"vitest": "^4.1.0"
}
}

1441
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

6
sheepit.toml Normal file
View File

@@ -0,0 +1,6 @@
[repository]
enable_commit = true
tag_pattern = "v{version}"
[scripts]
before_commit = "pnpm release"

View File

@@ -1,89 +1,93 @@
import {Inputs} from "./Inputs";
import {
import * as core from "@actions/core"
import type { ActionSkipper } from "./ActionSkipper.js"
import type { ArtifactDestroyer } from "./ArtifactDestroyer.js"
import type { ArtifactUploader } from "./ArtifactUploader.js"
import { GithubError } from "./GithubError.js"
import type { Inputs } from "./Inputs.js"
import type { Outputs } from "./Outputs.js"
import { ReleaseValidator } from "./ReleaseValidator.js"
import type {
CreateOrUpdateReleaseResponse,
CreateReleaseResponse,
ReleaseByTagResponse,
Releases,
UpdateReleaseResponse
} from "./Releases";
import {ArtifactUploader} from "./ArtifactUploader";
import {GithubError} from "./GithubError";
import {Outputs} from "./Outputs";
UpdateReleaseResponse,
} from "./Releases.js"
export class Action {
private inputs: Inputs
private outputs: Outputs
private releases: Releases
private uploader: ArtifactUploader
private artifactDestroyer: ArtifactDestroyer
private skipper: ActionSkipper
constructor(inputs: Inputs, outputs: Outputs, releases: Releases, uploader: ArtifactUploader) {
private releaseValidator: ReleaseValidator
constructor(
inputs: Inputs,
outputs: Outputs,
releases: Releases,
uploader: ArtifactUploader,
artifactDestroyer: ArtifactDestroyer,
skipper: ActionSkipper
) {
this.inputs = inputs
this.outputs = outputs
this.releases = releases
this.uploader = uploader
this.artifactDestroyer = artifactDestroyer
this.skipper = skipper
this.releaseValidator = new ReleaseValidator(inputs.updateOnlyUnreleased)
}
async perform() {
const releaseResponse = await this.createOrUpdateRelease();
const releaseData = releaseResponse.data
const releaseId = releaseData.id
const uploadUrl = releaseData.upload_url
const artifacts = this.inputs.artifacts
if (artifacts.length > 0) {
await this.uploader.uploadArtifacts(artifacts, releaseId, uploadUrl)
if (await this.skipper.shouldSkip()) {
core.notice("Skipping action, release already exists and skipIfReleaseExists is enabled.")
return
}
this.outputs.applyReleaseData(releaseData)
await this.createOrUpdateRelease()
}
private async createOrUpdateRelease(): Promise<CreateOrUpdateReleaseResponse> {
private async createOrUpdateRelease() {
if (this.inputs.allowUpdates) {
let getResponse: ReleaseByTagResponse
try {
getResponse = await this.releases.getByTag(this.inputs.tag)
} catch (error) {
return await this.checkForMissingReleaseError(error)
} catch (error: any) {
await this.checkForMissingReleaseError(error)
return
}
return await this.updateRelease(getResponse.data.id)
// Fail if this isn't an unreleased release & updateOnlyUnreleased is enabled.
this.releaseValidator.validateReleaseUpdate(getResponse.data)
await this.updateRelease(getResponse.data.id)
} else {
return await this.createRelease()
await this.createRelease()
}
}
private async checkForMissingReleaseError(error: Error): Promise<CreateOrUpdateReleaseResponse> {
private async checkForMissingReleaseError(error: Error): Promise<void> {
if (Action.noPublishedRelease(error)) {
return await this.updateDraftOrCreateRelease()
await this.updateDraftOrCreateRelease()
} else {
throw error
}
}
private async updateRelease(id: number): Promise<UpdateReleaseResponse> {
return await this.releases.update(
id,
this.inputs.tag,
this.inputs.updatedReleaseBody,
this.inputs.commit,
this.inputs.discussionCategory,
this.inputs.draft,
this.inputs.updatedReleaseName,
this.inputs.updatedPrerelease
)
}
private static noPublishedRelease(error: any): boolean {
const githubError = new GithubError(error)
return githubError.status == 404
}
private async updateDraftOrCreateRelease(): Promise<CreateReleaseResponse | UpdateReleaseResponse> {
private async updateDraftOrCreateRelease(): Promise<void> {
const draftReleaseId = await this.findMatchingDraftReleaseId()
if (draftReleaseId) {
return await this.updateRelease(draftReleaseId)
await this.updateRelease(draftReleaseId)
} else {
return await this.createRelease()
await this.createRelease()
}
}
@@ -91,20 +95,120 @@ export class Action {
const tag = this.inputs.tag
const response = await this.releases.listReleases()
const releases = response.data
const draftRelease = releases.find(release => release.draft && release.tag_name == tag)
if (!releases) {
throw new Error(`No releases found. Response: ${JSON.stringify(response)}`)
}
const draftRelease = releases.find((release) => release.draft && release.tag_name == tag)
return draftRelease?.id
}
private async createRelease(): Promise<CreateReleaseResponse> {
return await this.releases.create(
private async updateRelease(id: number) {
const releaseBody = await this.combineBodyWithReleaseNotes(this.inputs.updatedReleaseBody, true)
const releaseResponse = await this.releases.update(
id,
this.inputs.tag,
this.inputs.createdReleaseBody,
releaseBody,
this.inputs.commit,
this.inputs.discussionCategory,
this.inputs.draft,
this.inputs.updatedDraft,
this.inputs.makeLatest,
this.inputs.updatedReleaseName,
this.inputs.updatedPrerelease
)
await this.processReleaseArtifactsAndOutputs(releaseResponse, false)
}
private async createRelease() {
const releaseBody = await this.combineBodyWithReleaseNotes(this.inputs.createdReleaseBody, false)
// If immutableCreate is enabled we need to start with a draft release
const draft = this.inputs.createdDraft || this.inputs.immutableCreate
const releaseResponse = await this.releases.create(
this.inputs.tag,
releaseBody,
this.inputs.commit,
this.inputs.discussionCategory,
draft,
this.inputs.makeLatest,
this.inputs.createdReleaseName,
this.inputs.createdPrerelease
)
await this.processReleaseArtifactsAndOutputs(releaseResponse, true)
}
private async processReleaseArtifactsAndOutputs(releaseResponse: CreateOrUpdateReleaseResponse, wasCreated: boolean) {
const releaseData = releaseResponse.data
const releaseId = releaseData.id
const uploadUrl = releaseData.upload_url
if (this.inputs.removeArtifacts) {
await this.artifactDestroyer.destroyArtifacts(releaseId)
}
const artifacts = this.inputs.artifacts
let assetUrls: Record<string, string> = {}
if (artifacts.length > 0) {
assetUrls = await this.uploader.uploadArtifacts(artifacts, releaseId, uploadUrl)
}
if (wasCreated) {
const immutableRelease = await this.publishImmutableRelease(releaseId)
if (immutableRelease) {
this.setOutputs(immutableRelease.data, assetUrls)
return
}
}
this.setOutputs(releaseData, assetUrls)
}
private async publishImmutableRelease(releaseId: number): Promise<CreateOrUpdateReleaseResponse | undefined> {
// Check if immutableCreate is on and createdDraft is off
if (!this.inputs.immutableCreate || this.inputs.createdDraft) {
return undefined
}
return await this.releases.update(
releaseId,
this.inputs.tag,
undefined, // body is omitted
undefined, // commit is omitted
this.inputs.discussionCategory,
false, // We want to publish the release, set draft to false
this.inputs.makeLatest,
this.inputs.createdReleaseName,
this.inputs.createdPrerelease
)
}
private async combineBodyWithReleaseNotes(body: string | undefined, isUpdate: boolean): Promise<string | undefined> {
// Determine if we should generate release notes based on operation type
const shouldGenerateReleaseNotes = isUpdate
? this.inputs.generateReleaseNotes && !this.inputs.omitBodyDuringUpdate
: this.inputs.generateReleaseNotes
if (!shouldGenerateReleaseNotes) {
return body
}
const response = await this.releases.generateReleaseNotes(this.inputs.tag, this.inputs.generateReleaseNotesPreviousTag, this.inputs.commit)
const releaseNotes = response.data.body
if (!body || body.trim() === "") {
return releaseNotes
}
return `${body}\n${releaseNotes}`
}
private setOutputs(releaseData: any, assetUrls: Record<string, string>): void {
this.outputs.applyReleaseData(releaseData)
this.outputs.applyAssetUrls(assetUrls)
}
}

28
src/ActionSkipper.ts Normal file
View File

@@ -0,0 +1,28 @@
import { Releases } from "./Releases.js"
export interface ActionSkipper {
shouldSkip(): Promise<boolean>
}
export class ReleaseActionSkipper {
constructor(
private skipIfReleaseExists: boolean,
private releases: Releases,
private tag: string
) {}
async shouldSkip(): Promise<boolean> {
if (!this.skipIfReleaseExists) {
// Bail if skip flag isn't set.
return false
}
try {
const getResponse = await this.releases.getByTag(this.tag)
return getResponse.data != null
} catch (error: any) {
// There is either no release or something else went wrong. Either way, run the action.
return false
}
}
}

View File

@@ -1,5 +1,5 @@
import { basename } from "path";
import { readFileSync, statSync } from "fs";
import { basename } from "path"
import { createReadStream, readFileSync, ReadStream, statSync } from "fs"
export class Artifact {
readonly contentType: string
@@ -9,14 +9,14 @@ export class Artifact {
constructor(path: string, contentType: string = "raw") {
this.path = path
this.name = basename(path)
this.contentType = contentType;
this.contentType = contentType
}
get contentLength(): number {
return statSync(this.path).size
}
readFile(): Buffer {
return readFileSync(this.path)
readFile(): ReadStream {
return createReadStream(this.path)
}
}

19
src/ArtifactDestroyer.ts Normal file
View File

@@ -0,0 +1,19 @@
import { Releases } from "./Releases.js"
import * as core from "@actions/core"
export interface ArtifactDestroyer {
destroyArtifacts(releaseId: number): Promise<void>
}
export class GithubArtifactDestroyer implements ArtifactDestroyer {
constructor(private releases: Releases) {}
async destroyArtifacts(releaseId: number): Promise<void> {
const releaseAssets = await this.releases.listArtifactsForRelease(releaseId)
for (const artifact of releaseAssets) {
const asset = artifact
core.debug(`Deleting existing artifact ${artifact.name}...`)
await this.releases.deleteArtifact(asset.id)
}
}
}

View File

@@ -1,8 +1,9 @@
import * as core from '@actions/core';
import {Globber, FileGlobber} from "./Globber";
import {Artifact} from "./Artifact";
import untildify from "untildify";
import {ArtifactPathValidator} from "./ArtifactPathValidator";
import * as core from "@actions/core"
import { Globber, FileGlobber } from "./Globber.js"
import { Artifact } from "./Artifact.js"
import { expandTilde } from "./PathExpander.js"
import { ArtifactPathValidator } from "./ArtifactPathValidator.js"
import { PathNormalizer } from "./PathNormalizer.js"
export interface ArtifactGlobber {
globArtifactString(artifact: string, contentType: string, errorsFailBuild: boolean): Artifact[]
@@ -16,12 +17,16 @@ export class FileArtifactGlobber implements ArtifactGlobber {
}
globArtifactString(artifact: string, contentType: string, errorsFailBuild: boolean): Artifact[] {
return artifact.split(',')
.map(path => FileArtifactGlobber.expandPath(path))
.map(pattern => this.globPattern(pattern, errorsFailBuild))
const split = /[,\n]/
return artifact
.split(split)
.map((path) => path.trimStart())
.map((path) => PathNormalizer.normalizePath(path))
.map((path) => FileArtifactGlobber.expandPath(path))
.map((pattern) => this.globPattern(pattern, errorsFailBuild))
.map((globResult) => FileArtifactGlobber.validatePattern(errorsFailBuild, globResult[1], globResult[0]))
.reduce((accumulated, current) => accumulated.concat(current))
.map(path => new Artifact(path, contentType))
.map((path) => new Artifact(path, contentType))
}
private globPattern(pattern: string, errorsFailBuild: boolean): [string, string[]] {
@@ -50,6 +55,6 @@ export class FileArtifactGlobber implements ArtifactGlobber {
}
private static expandPath(path: string): string {
return untildify(path)
return expandTilde(path)
}
}
}

View File

@@ -1,29 +1,29 @@
import * as core from "@actions/core";
import {statSync} from "fs";
import * as core from "@actions/core"
import { statSync } from "fs"
export class ArtifactPathValidator {
private readonly errorsFailBuild: boolean;
private paths: string[];
private readonly errorsFailBuild: boolean
private paths: string[]
private readonly pattern: string
constructor(errorsFailBuild: boolean, paths: string[], pattern: string) {
this.paths = paths;
this.paths = paths
this.pattern = pattern
this.errorsFailBuild = errorsFailBuild;
this.errorsFailBuild = errorsFailBuild
}
validate(): string[] {
this.verifyPathsNotEmpty()
return this.paths.filter((path) => this.verifyNotDirectory(path))
}
private verifyPathsNotEmpty() {
if (this.paths.length == 0) {
const message = `Artifact pattern:${this.pattern} did not match any files`
this.reportError(message)
}
}
private verifyNotDirectory(path: string): boolean {
const isDir = statSync(path).isDirectory()
if (isDir) {
@@ -32,7 +32,7 @@ export class ArtifactPathValidator {
}
return !isDir
}
private reportError(message: string) {
if (this.errorsFailBuild) {
throw Error(message)
@@ -40,4 +40,4 @@ export class ArtifactPathValidator {
core.warning(message)
}
}
}
}

View File

@@ -1,51 +1,54 @@
import * as core from '@actions/core';
import {Artifact} from "./Artifact";
import {Releases} from "./Releases";
import * as core from "@actions/core"
import { Artifact } from "./Artifact.js"
import { Releases } from "./Releases.js"
export interface ArtifactUploader {
uploadArtifacts(artifacts: Artifact[], releaseId: number, uploadUrl: string): Promise<void>
uploadArtifacts(artifacts: Artifact[], releaseId: number, uploadUrl: string): Promise<Record<string, string>>
}
export class GithubArtifactUploader implements ArtifactUploader {
constructor(
private releases: Releases,
private replacesExistingArtifacts: boolean = true,
private throwsUploadErrors: boolean = false,
) {
}
private throwsUploadErrors: boolean = false
) {}
async uploadArtifacts(artifacts: Artifact[],
releaseId: number,
uploadUrl: string): Promise<void> {
async uploadArtifacts(artifacts: Artifact[], releaseId: number, uploadUrl: string): Promise<Record<string, string>> {
if (this.replacesExistingArtifacts) {
await this.deleteUpdatedArtifacts(artifacts, releaseId)
}
const assetUrls: Record<string, string> = {}
for (const artifact of artifacts) {
await this.uploadArtifact(artifact, releaseId, uploadUrl)
const assetUrl = await this.uploadArtifact(artifact, releaseId, uploadUrl)
if (assetUrl !== null) {
assetUrls[artifact.name] = assetUrl
}
}
return assetUrls
}
private async uploadArtifact(artifact: Artifact,
releaseId: number,
uploadUrl: string,
retry = 3) {
private async uploadArtifact(artifact: Artifact, releaseId: number, uploadUrl: string, retry = 3): Promise<string | null> {
try {
core.debug(`Uploading artifact ${artifact.name}...`)
await this.releases.uploadArtifact(uploadUrl,
const assetResponse = await this.releases.uploadArtifact(
uploadUrl,
artifact.contentLength,
artifact.contentType,
artifact.readFile(),
artifact.name,
releaseId)
} catch (error) {
releaseId
)
return assetResponse.data.browser_download_url
} catch (error: any) {
if (error.status >= 500 && retry > 0) {
core.warning(`Failed to upload artifact ${artifact.name}. ${error.message}. Retrying...`)
await this.uploadArtifact(artifact, releaseId, uploadUrl, retry - 1)
return this.uploadArtifact(artifact, releaseId, uploadUrl, retry - 1)
} else {
if (this.throwsUploadErrors) {
throw Error(`Failed to upload artifact ${artifact.name}. ${error.message}.`)
} else {
core.warning(`Failed to upload artifact ${artifact.name}. ${error.message}.`)
return null
}
}
}
@@ -54,9 +57,9 @@ export class GithubArtifactUploader implements ArtifactUploader {
private async deleteUpdatedArtifacts(artifacts: Artifact[], releaseId: number): Promise<void> {
const releaseAssets = await this.releases.listArtifactsForRelease(releaseId)
const assetByName: Record<string, { id: number; name: string }> = {}
releaseAssets.forEach(asset => {
releaseAssets.forEach((asset) => {
assetByName[asset.name] = asset
});
})
for (const artifact of artifacts) {
const asset = assetByName[artifact.name]
if (asset) {

View File

@@ -1,4 +1,4 @@
import {GithubErrorDetail} from "./GithubErrorDetail"
import { GithubErrorDetail } from "./GithubErrorDetail.js"
export class GithubError {
private error: any
@@ -31,14 +31,20 @@ export class GithubError {
const errors = this.githubErrors
const status = this.status
if (errors.length > 0) {
return `Error ${status}: ${message}\nErrors:\n${this.errorBulletedList(errors)}`
return `Error ${status}: ${message}\nErrors:\n${this.errorBulletedList(errors)}${this.remediation()}`
} else {
return `Error ${status}: ${message}`
return `Error ${status}: ${message}${this.remediation()}`
}
}
private errorBulletedList(errors: GithubErrorDetail[]): string {
return errors.map((err) => `- ${err}`).join("\n")
}
}
private remediation(): String {
if (this.status == 404) {
return "\nMake sure your github token has access to the repo and has permission to author releases"
}
return ""
}
}

View File

@@ -1,5 +1,5 @@
export class GithubErrorDetail {
private error: any;
private error: any
constructor(error: any) {
this.error = error
@@ -12,13 +12,13 @@ export class GithubErrorDetail {
toString(): string {
const code = this.error.code
switch (code) {
case 'missing':
case "missing":
return this.missingResourceMessage()
case 'missing_field':
case "missing_field":
return this.missingFieldMessage()
case 'invalid':
case "invalid":
return this.invalidFieldMessage()
case 'already_exists':
case "already_exists":
return this.resourceAlreadyExists()
default:
return this.customErrorMessage()
@@ -26,7 +26,7 @@ export class GithubErrorDetail {
}
private customErrorMessage(): string {
const message = this.error.message;
const message = this.error.message
const documentation = this.error.documentation_url
let documentationMessage: string

View File

@@ -1,4 +1,4 @@
import { GlobSync } from "glob";
import { globSync } from "glob"
export interface Globber {
glob(pattern: string): string[]
@@ -6,6 +6,6 @@ export interface Globber {
export class FileGlobber implements Globber {
glob(pattern: string): string[] {
return new GlobSync(pattern, { mark: true }).found
return globSync(pattern, { mark: true })
}
}
}

View File

@@ -1,62 +1,94 @@
import * as core from '@actions/core';
import {Context} from "@actions/github/lib/context";
import {readFileSync} from 'fs';
import {ArtifactGlobber} from './ArtifactGlobber';
import {Artifact} from './Artifact';
import { readFileSync } from "node:fs"
import * as core from "@actions/core"
import type * as github from "@actions/github"
import type { Artifact } from "./Artifact.js"
import type { ArtifactGlobber } from "./ArtifactGlobber.js"
export interface Inputs {
readonly allowUpdates: boolean
readonly artifactErrorsFailBuild: boolean
readonly artifacts: Artifact[]
readonly commit: string
readonly commit?: string
readonly createdDraft: boolean
readonly createdPrerelease: boolean
readonly createdReleaseBody?: string
readonly createdReleaseName?: string
readonly discussionCategory?: string
readonly draft: boolean
readonly generateReleaseNotes: boolean
readonly generateReleaseNotesPreviousTag?: string
readonly immutableCreate: boolean
readonly makeLatest?: "legacy" | "true" | "false" | undefined
readonly omitBodyDuringUpdate: boolean
readonly owner: string
readonly createdPrerelease: boolean
readonly removeArtifacts: boolean
readonly replacesArtifacts: boolean
readonly repo: string
readonly skipIfReleaseExists: boolean
readonly tag: string
readonly token: string
readonly updatedDraft?: boolean
readonly updatedReleaseBody?: string
readonly updatedReleaseName?: string
readonly updatedPrerelease?: boolean
readonly updateOnlyUnreleased: boolean
}
export class CoreInputs implements Inputs {
private artifactGlobber: ArtifactGlobber
private context: Context
private context: typeof github.context
constructor(artifactGlobber: ArtifactGlobber, context: Context) {
constructor(artifactGlobber: ArtifactGlobber, context: typeof github.context) {
this.artifactGlobber = artifactGlobber
this.context = context
}
get allowUpdates(): boolean {
const allow = core.getInput('allowUpdates')
return allow == 'true'
const allow = core.getInput("allowUpdates")
return allow === "true"
}
get artifacts(): Artifact[] {
let artifacts = core.getInput('artifacts')
let artifacts = core.getInput("artifacts")
if (!artifacts) {
artifacts = core.getInput('artifact')
artifacts = core.getInput("artifact")
}
if (artifacts) {
let contentType = core.getInput('artifactContentType')
let contentType = core.getInput("artifactContentType")
if (!contentType) {
contentType = 'raw'
contentType = "raw"
}
return this.artifactGlobber
.globArtifactString(artifacts, contentType, this.artifactErrorsFailBuild)
return this.artifactGlobber.globArtifactString(artifacts, contentType, this.artifactErrorsFailBuild)
}
return []
}
get artifactErrorsFailBuild(): boolean {
const allow = core.getInput('artifactErrorsFailBuild')
return allow == 'true'
const allow = core.getInput("artifactErrorsFailBuild")
return allow === "true"
}
private get body(): string | undefined {
const body = core.getInput("body")
if (body) {
return body
}
const bodyFile = core.getInput("bodyFile")
if (bodyFile) {
return this.stringFromFile(bodyFile)
}
return ""
}
get createdDraft(): boolean {
const draft = core.getInput("draft")
return draft === "true"
}
get createdPrerelease(): boolean {
const preRelease = core.getInput("prerelease")
return preRelease === "true"
}
get createdReleaseBody(): string | undefined {
@@ -65,25 +97,7 @@ export class CoreInputs implements Inputs {
}
private static get omitBody(): boolean {
return core.getInput('omitBody') == 'true'
}
private get body(): string | undefined {
const body = core.getInput('body')
if (body) {
return body
}
const bodyFile = core.getInput('bodyFile')
if (bodyFile) {
return this.stringFromFile(bodyFile)
}
return ''
}
get commit(): string {
return core.getInput('commit')
return core.getInput("omitBody") === "true"
}
get createdReleaseName(): string | undefined {
@@ -91,20 +105,28 @@ export class CoreInputs implements Inputs {
return this.name
}
private static get omitName(): boolean {
return core.getInput("omitName") === "true"
}
get commit(): string | undefined {
const commit = core.getInput("commit")
if (commit) {
return commit
}
return undefined
}
get discussionCategory(): string | undefined {
const category = core.getInput('discussionCategory')
const category = core.getInput("discussionCategory")
if (category) {
return category
}
return undefined
}
private static get omitName(): boolean {
return core.getInput('omitName') == 'true'
}
private get name(): string | undefined {
const name = core.getInput('name')
const name = core.getInput("name")
if (name) {
return name
}
@@ -112,54 +134,69 @@ export class CoreInputs implements Inputs {
return this.tag
}
get draft(): boolean {
const draft = core.getInput('draft')
return draft == 'true'
get generateReleaseNotes(): boolean {
const generate = core.getInput("generateReleaseNotes")
return generate === "true"
}
get generateReleaseNotesPreviousTag(): string | undefined {
const previousTag = core.getInput("generateReleaseNotesPreviousTag")
return previousTag || undefined
}
get immutableCreate(): boolean {
const immutable = core.getInput("immutableCreate")
return immutable === "true"
}
get makeLatest(): "legacy" | "true" | "false" | undefined {
const latest = core.getInput("makeLatest")
if (latest === "true" || latest === "false" || latest === "legacy") {
return latest
}
return undefined
}
get owner(): string {
let owner = core.getInput('owner')
const owner = core.getInput("owner")
if (owner) {
return owner
}
return this.context.repo.owner
}
get createdPrerelease(): boolean {
const preRelease = core.getInput('prerelease')
return preRelease == 'true'
get removeArtifacts(): boolean {
const removes = core.getInput("removeArtifacts")
return removes === "true"
}
private static get omitPrereleaseDuringUpdate(): boolean {
return core.getInput('omitPrereleaseDuringUpdate') == 'true'
}
get updatedPrerelease(): boolean | undefined {
if (CoreInputs.omitPrereleaseDuringUpdate) return undefined
return this.createdPrerelease
}
get replacesArtifacts(): boolean {
const replaces = core.getInput('replacesArtifacts')
return replaces == 'true'
const replaces = core.getInput("replacesArtifacts")
return replaces === "true"
}
get repo(): string {
let repo = core.getInput('repo')
const repo = core.getInput("repo")
if (repo) {
return repo
}
return this.context.repo.repo
}
get skipIfReleaseExists(): boolean {
return core.getBooleanInput("skipIfReleaseExists")
}
get tag(): string {
const tag = core.getInput('tag')
const tag = core.getInput("tag")
if (tag) {
return tag;
return tag
}
const ref = this.context.ref
const tagPath = "refs/tags/"
if (ref && ref.startsWith(tagPath)) {
if (ref?.startsWith(tagPath)) {
return ref.substr(tagPath.length, ref.length)
}
@@ -167,7 +204,25 @@ export class CoreInputs implements Inputs {
}
get token(): string {
return core.getInput('token', {required: true})
return core.getInput("token", { required: true })
}
get updatedDraft(): boolean | undefined {
if (CoreInputs.omitDraftDuringUpdate) return undefined
return this.createdDraft
}
private static get omitDraftDuringUpdate(): boolean {
return core.getInput("omitDraftDuringUpdate") === "true"
}
get updatedPrerelease(): boolean | undefined {
if (CoreInputs.omitPrereleaseDuringUpdate) return undefined
return this.createdPrerelease
}
private static get omitPrereleaseDuringUpdate(): boolean {
return core.getInput("omitPrereleaseDuringUpdate") === "true"
}
get updatedReleaseBody(): string | undefined {
@@ -175,8 +230,8 @@ export class CoreInputs implements Inputs {
return this.body
}
private static get omitBodyDuringUpdate(): boolean {
return core.getInput('omitBodyDuringUpdate') == 'true'
get updateOnlyUnreleased(): boolean {
return core.getInput("updateOnlyUnreleased") === "true"
}
get updatedReleaseName(): string | undefined {
@@ -184,11 +239,19 @@ export class CoreInputs implements Inputs {
return this.name
}
private static get omitBodyDuringUpdate(): boolean {
return core.getInput("omitBodyDuringUpdate") === "true"
}
get omitBodyDuringUpdate(): boolean {
return CoreInputs.omitBodyDuringUpdate
}
private static get omitNameDuringUpdate(): boolean {
return core.getInput('omitNameDuringUpdate') == 'true'
return core.getInput("omitNameDuringUpdate") === "true"
}
stringFromFile(path: string): string {
return readFileSync(path, 'utf-8')
return readFileSync(path, "utf-8")
}
}

View File

@@ -1,12 +1,14 @@
import * as github from '@actions/github';
import * as core from '@actions/core';
import {CoreInputs} from './Inputs';
import {GithubReleases} from './Releases';
import {Action} from './Action';
import {GithubArtifactUploader} from './ArtifactUploader';
import {FileArtifactGlobber} from './ArtifactGlobber';
import {GithubError} from './GithubError';
import {CoreOutputs} from "./Outputs";
import * as github from "@actions/github"
import * as core from "@actions/core"
import { CoreInputs } from "./Inputs.js"
import { GithubReleases } from "./Releases.js"
import { Action } from "./Action.js"
import { GithubArtifactUploader } from "./ArtifactUploader.js"
import { FileArtifactGlobber } from "./ArtifactGlobber.js"
import { GithubError } from "./GithubError.js"
import { CoreOutputs } from "./Outputs.js"
import { GithubArtifactDestroyer } from "./ArtifactDestroyer.js"
import { ActionSkipper, ReleaseActionSkipper } from "./ActionSkipper.js"
async function run() {
try {
@@ -14,12 +16,12 @@ async function run() {
await action.perform()
} catch (error) {
const githubError = new GithubError(error)
core.setFailed(githubError.toString());
core.setFailed(githubError.toString())
}
}
function createAction(): Action {
const token = core.getInput('token')
const token = core.getInput("token")
const context = github.context
const git = github.getOctokit(token)
const globber = new FileArtifactGlobber()
@@ -27,8 +29,11 @@ function createAction(): Action {
const inputs = new CoreInputs(globber, context)
const outputs = new CoreOutputs()
const releases = new GithubReleases(inputs, git)
const skipper = new ReleaseActionSkipper(inputs.skipIfReleaseExists, releases, inputs.tag)
const uploader = new GithubArtifactUploader(releases, inputs.replacesArtifacts, inputs.artifactErrorsFailBuild)
return new Action(inputs, outputs, releases, uploader)
const artifactDestroyer = new GithubArtifactDestroyer(releases)
return new Action(inputs, outputs, releases, uploader, artifactDestroyer, skipper)
}
run();
run()

View File

@@ -1,14 +1,22 @@
import * as core from '@actions/core';
import {ReleaseData} from "./Releases";
import * as core from "@actions/core"
import { ReleaseData } from "./Releases.js"
export interface Outputs {
applyReleaseData(releaseData: ReleaseData): void
applyAssetUrls(assetUrls: Record<string, string>): void
}
export class CoreOutputs implements Outputs {
applyReleaseData(releaseData: ReleaseData) {
core.setOutput('id', releaseData.id)
core.setOutput('html_url', releaseData.html_url)
core.setOutput('upload_url', releaseData.upload_url)
core.setOutput("id", releaseData.id)
core.setOutput("html_url", releaseData.html_url)
core.setOutput("upload_url", releaseData.upload_url)
core.setOutput("tarball_url", releaseData.tarball_url || "")
core.setOutput("zipball_url", releaseData.zipball_url || "")
}
}
applyAssetUrls(assetUrls: Record<string, string>) {
const assetUrlsJson = JSON.stringify(assetUrls)
core.setOutput("assets", assetUrlsJson)
}
}

6
src/PathExpander.ts Normal file
View File

@@ -0,0 +1,6 @@
import os from "os"
export function expandTilde(path: string): string {
return path.replace(/^~(?=$|\/|\\)/, os.homedir())
}

7
src/PathNormalizer.ts Normal file
View File

@@ -0,0 +1,7 @@
import path from "path"
export class PathNormalizer {
static normalizePath(pathString: string): string {
return pathString.split(path.sep).join("/")
}
}

21
src/ReleaseValidator.ts Normal file
View File

@@ -0,0 +1,21 @@
export class ReleaseValidator {
constructor(private updateOnlyUnreleased: boolean) {}
validateReleaseUpdate(releaseResponse: ReleaseStageArguments) {
if (!this.updateOnlyUnreleased) {
return
}
if (!releaseResponse.draft && !releaseResponse.prerelease) {
throw new Error(
`Tried to update "${releaseResponse.name ?? "release"}" which is neither a draft or prerelease. (updateOnlyUnreleased is on)`
)
}
}
}
export type ReleaseStageArguments = {
draft: boolean
name: string | null
prerelease: boolean
}

View File

@@ -1,7 +1,7 @@
import {GitHub} from '@actions/github/lib/utils'
import {OctokitResponse} from "@octokit/types";
import {RestEndpointMethodTypes} from "@octokit/plugin-rest-endpoint-methods";
import {Inputs} from "./Inputs";
import * as github from "@actions/github"
import type { RestEndpointMethodTypes } from "@octokit/plugin-rest-endpoint-methods"
import type { OctokitResponse } from "@octokit/types"
import type { Inputs } from "./Inputs.js"
export type CreateReleaseResponse = RestEndpointMethodTypes["repos"]["createRelease"]["response"]
export type ReleaseByTagResponse = RestEndpointMethodTypes["repos"]["getReleaseByTag"]["response"]
@@ -10,11 +10,14 @@ export type ListReleaseAssetsResponseData = RestEndpointMethodTypes["repos"]["li
export type UpdateReleaseResponse = RestEndpointMethodTypes["repos"]["updateRelease"]["response"]
export type UploadArtifactResponse = RestEndpointMethodTypes["repos"]["uploadReleaseAsset"]["response"]
export type CreateOrUpdateReleaseResponse = CreateReleaseResponse | UpdateReleaseResponse
export type GenerateReleaseNotesResponse = RestEndpointMethodTypes["repos"]["generateReleaseNotes"]["response"]
export type ReleaseData = {
id: number
html_url: string
upload_url: string
tarball_url: string | null
zipball_url: string | null
}
export interface Releases {
@@ -24,6 +27,7 @@ export interface Releases {
commitHash?: string,
discussionCategory?: string,
draft?: boolean,
makeLatest?: "legacy" | "true" | "false" | undefined,
name?: string,
prerelease?: boolean
): Promise<CreateReleaseResponse>
@@ -32,6 +36,8 @@ export interface Releases {
getByTag(tag: string): Promise<ReleaseByTagResponse>
generateReleaseNotes(tag: string, previousTag?: string, targetCommitish?: string): Promise<GenerateReleaseNotesResponse>
listArtifactsForRelease(releaseId: number): Promise<ListReleaseAssetsResponseData>
listReleases(): Promise<ListReleasesResponse>
@@ -43,6 +49,7 @@ export interface Releases {
commitHash?: string,
discussionCategory?: string,
draft?: boolean,
makeLatest?: "legacy" | "true" | "false" | undefined,
name?: string,
prerelease?: boolean
): Promise<UpdateReleaseResponse>
@@ -53,15 +60,15 @@ export interface Releases {
contentType: string,
file: string | object,
name: string,
releaseId: number,
releaseId: number
): Promise<UploadArtifactResponse>
}
export class GithubReleases implements Releases {
git: InstanceType<typeof GitHub>
git: ReturnType<typeof github.getOctokit>
inputs: Inputs
constructor(inputs: Inputs, git: InstanceType<typeof GitHub>) {
constructor(inputs: Inputs, git: ReturnType<typeof github.getOctokit>) {
this.inputs = inputs
this.git = git
}
@@ -72,6 +79,7 @@ export class GithubReleases implements Releases {
commitHash?: string,
discussionCategory?: string,
draft?: boolean,
makeLatest?: "legacy" | "true" | "false" | undefined,
name?: string,
prerelease?: boolean
): Promise<CreateReleaseResponse> {
@@ -81,46 +89,61 @@ export class GithubReleases implements Releases {
name: name,
discussion_category_name: discussionCategory,
draft: draft,
make_latest: makeLatest,
owner: this.inputs.owner,
prerelease: prerelease,
repo: this.inputs.repo,
target_commitish: commitHash,
tag_name: tag
tag_name: tag,
})
}
async deleteArtifact(
assetId: number
): Promise<OctokitResponse<any>> {
async deleteArtifact(assetId: number): Promise<OctokitResponse<any>> {
return this.git.rest.repos.deleteReleaseAsset({
asset_id: assetId,
owner: this.inputs.owner,
repo: this.inputs.repo
repo: this.inputs.repo,
})
}
async generateReleaseNotes(tag: string, previousTag?: string, targetCommitish?: string): Promise<GenerateReleaseNotesResponse> {
const params: any = {
owner: this.inputs.owner,
repo: this.inputs.repo,
tag_name: tag,
}
if (previousTag) {
params.previous_tag_name = previousTag
}
if (targetCommitish) {
params.target_commitish = targetCommitish
}
return this.git.rest.repos.generateReleaseNotes(params)
}
async getByTag(tag: string): Promise<ReleaseByTagResponse> {
return this.git.rest.repos.getReleaseByTag({
owner: this.inputs.owner,
repo: this.inputs.repo,
tag: tag
tag: tag,
})
}
async listArtifactsForRelease(
releaseId: number
): Promise<ListReleaseAssetsResponseData> {
async listArtifactsForRelease(releaseId: number): Promise<ListReleaseAssetsResponseData> {
return this.git.paginate(this.git.rest.repos.listReleaseAssets, {
owner: this.inputs.owner,
release_id: releaseId,
repo: this.inputs.repo
repo: this.inputs.repo,
})
}
async listReleases(): Promise<ListReleasesResponse> {
return this.git.rest.repos.listReleases({
owner: this.inputs.owner,
repo: this.inputs.repo
repo: this.inputs.repo,
})
}
@@ -131,6 +154,7 @@ export class GithubReleases implements Releases {
commitHash?: string,
discussionCategory?: string,
draft?: boolean,
makeLatest?: "legacy" | "true" | "false" | undefined,
name?: string,
prerelease?: boolean
): Promise<UpdateReleaseResponse> {
@@ -141,11 +165,12 @@ export class GithubReleases implements Releases {
name: name,
discussion_category_name: discussionCategory,
draft: draft,
make_latest: makeLatest,
owner: this.inputs.owner,
prerelease: prerelease,
repo: this.inputs.repo,
target_commitish: commitHash,
tag_name: tag
tag_name: tag,
})
}
@@ -155,19 +180,19 @@ export class GithubReleases implements Releases {
contentType: string,
file: string | object,
name: string,
releaseId: number,
releaseId: number
): Promise<UploadArtifactResponse> {
return this.git.rest.repos.uploadReleaseAsset({
url: assetUrl,
headers: {
"content-length": contentLength,
"content-type": contentType
"content-type": contentType,
},
data: file as any,
name: name,
owner: this.inputs.owner,
release_id: releaseId,
repo: this.inputs.repo
repo: this.inputs.repo,
})
}
}

View File

@@ -1,12 +1,16 @@
{
"compilerOptions": {
"target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"outDir": "./lib", /* Redirect output structure to the directory. */
"rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
"strict": true, /* Enable all strict type-checking options. */
"noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
},
"exclude": ["node_modules", "**/*.test.ts"]
}
"compilerOptions": {
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"outDir": "./lib",
"rootDir": ".",
"strict": true,
"skipLibCheck": true,
"noImplicitAny": true,
"esModuleInterop": true,
"types": ["node"]
},
"include": ["src/**/*"],
"exclude": ["node_modules", "**/*.test.ts", "__mocks__/**/*", "vitest.config.ts"]
}

7
tsconfig.test.json Normal file
View File

@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"isolatedModules": true
},
"include": ["src/**/*", "__tests__/**/*"]
}

21
vitest.config.ts Normal file
View File

@@ -0,0 +1,21 @@
import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
globals: true,
environment: 'node',
include: ['**/*.test.ts'],
coverage: {
provider: 'v8',
reporter: ['text', 'lcov'],
include: ['src/**/*.ts'],
exclude: ['src/Globber.ts', 'src/Releases.ts'],
thresholds: {
lines: 100,
functions: 100,
branches: 95,
statements: 100,
},
},
},
})

4550
yarn.lock

File diff suppressed because it is too large Load Diff