diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..19226af --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,33 @@ +version: 2 +updates: + - package-ecosystem: npm + directory: "/" + schedule: + interval: weekly + groups: + npm: + patterns: + - "*" + ignore: + - dependency-name: node-fetch + versions: + - ">=3.0.0" + # ignore mime and @types/mime per https://github.com/softprops/action-gh-release/pull/475 + - dependency-name: mime + versions: + - ">=4.0.0" + - dependency-name: "@types/mime" + versions: + - ">=4.0.0" + commit-message: + prefix: "chore(deps)" + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: weekly + groups: + github-actions: + patterns: + - "*" + commit-message: + prefix: "chore(deps)" diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..7a9dcdb --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,22 @@ +changelog: + exclude: + labels: + - ignore-for-release + - github-actions + authors: + - octocat + - renovate[bot] + categories: + - title: Breaking Changes 🛠 + labels: + - breaking-change + - title: Exciting New Features 🎉 + labels: + - enhancement + - feature + - title: Bug fixes 🐛 + labels: + - bug + - title: Other Changes 🔄 + labels: + - "*" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 35acd65..f85d3e2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,14 +1,20 @@ -name: Main +name: main -on: [pull_request, push] +on: + push: + pull_request: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - # https://github.com/actions/checkout - - name: Checkout - uses: actions/checkout@v2 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 + with: + node-version-file: ".tool-versions" + cache: "npm" + - name: Install run: npm ci - name: Build @@ -23,4 +29,4 @@ jobs: # git diff --exit-code --stat -- . ':!node_modules' \ # || (echo "##[error] found changed files after build. please 'npm run build && npm run fmt'" \ # "and check in all changes" \ - # && exit 1) \ No newline at end of file + # && exit 1) diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..77730a6 --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +nodejs 20.19.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index f437df6..78065cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,169 @@ +## 2.2.2 + +## What's Changed + +### Bug fixes 🐛 + +* fix: updating release draft status from true to false by @galargh in https://github.com/softprops/action-gh-release/pull/316 + +### Other Changes 🔄 + +* chore: simplify ref_type test by @steinybot in https://github.com/softprops/action-gh-release/pull/598 +* fix(docs): clarify the default for tag_name by @muzimuzhi in https://github.com/softprops/action-gh-release/pull/599 +* test(release): add unit tests when searching for a release by @rwaskiewicz in https://github.com/softprops/action-gh-release/pull/603 +* dependency updates + +## 2.2.1 + +## What's Changed + +### Bug fixes 🐛 + +* fix: big file uploads by @xen0n in https://github.com/softprops/action-gh-release/pull/562 + +### Other Changes 🔄 +* chore(deps): bump @types/node from 22.10.1 to 22.10.2 by @dependabot in https://github.com/softprops/action-gh-release/pull/559 +* chore(deps): bump @types/node from 22.10.2 to 22.10.5 by @dependabot in https://github.com/softprops/action-gh-release/pull/569 +* chore: update error and warning messages for not matching files in files field by @ytimocin in https://github.com/softprops/action-gh-release/pull/568 + +## 2.2.0 + +## What's Changed + +### Exciting New Features 🎉 + +* feat: read the release assets asynchronously by @xen0n in https://github.com/softprops/action-gh-release/pull/552 + +### Bug fixes 🐛 + +* fix(docs): clarify the default for tag_name by @alexeagle in https://github.com/softprops/action-gh-release/pull/544 + +### Other Changes 🔄 + +* chore(deps): bump typescript from 5.6.3 to 5.7.2 by @dependabot in https://github.com/softprops/action-gh-release/pull/548 +* chore(deps): bump @types/node from 22.9.0 to 22.9.4 by @dependabot in https://github.com/softprops/action-gh-release/pull/547 +* chore(deps): bump cross-spawn from 7.0.3 to 7.0.6 by @dependabot in https://github.com/softprops/action-gh-release/pull/545 +* chore(deps): bump @vercel/ncc from 0.38.2 to 0.38.3 by @dependabot in https://github.com/softprops/action-gh-release/pull/543 +* chore(deps): bump prettier from 3.3.3 to 3.4.1 by @dependabot in https://github.com/softprops/action-gh-release/pull/550 +* chore(deps): bump @types/node from 22.9.4 to 22.10.1 by @dependabot in https://github.com/softprops/action-gh-release/pull/551 +* chore(deps): bump prettier from 3.4.1 to 3.4.2 by @dependabot in https://github.com/softprops/action-gh-release/pull/554 + +## 2.1.0 + +## What's Changed + +### Exciting New Features 🎉 +* feat: add support for release assets with multiple spaces within the name by @dukhine in https://github.com/softprops/action-gh-release/pull/518 +* feat: preserve upload order by @richarddd in https://github.com/softprops/action-gh-release/pull/500 + +### Other Changes 🔄 +* chore(deps): bump @types/node from 22.8.2 to 22.8.7 by @dependabot in https://github.com/softprops/action-gh-release/pull/539 + +## 2.0.9 + +- maintenance release with updated dependencies + +## 2.0.8 + +### Other Changes 🔄 +* chore(deps): bump prettier from 2.8.0 to 3.3.3 by @dependabot in https://github.com/softprops/action-gh-release/pull/480 +* chore(deps): bump @types/node from 20.14.9 to 20.14.11 by @dependabot in https://github.com/softprops/action-gh-release/pull/483 +* chore(deps): bump @octokit/plugin-throttling from 9.3.0 to 9.3.1 by @dependabot in https://github.com/softprops/action-gh-release/pull/484 +* chore(deps): bump glob from 10.4.2 to 11.0.0 by @dependabot in https://github.com/softprops/action-gh-release/pull/477 +* refactor: write jest config in ts by @chenrui333 in https://github.com/softprops/action-gh-release/pull/485 +* chore(deps): bump @actions/github from 5.1.1 to 6.0.0 by @dependabot in https://github.com/softprops/action-gh-release/pull/470 + +## 2.0.7 + +### Bug fixes 🐛 + +* Fix missing update release body by @FirelightFlagboy in https://github.com/softprops/action-gh-release/pull/365 + +### Other Changes 🔄 + +* Bump @octokit/plugin-retry from 4.0.3 to 7.1.1 by @dependabot in https://github.com/softprops/action-gh-release/pull/443 +* Bump typescript from 4.9.5 to 5.5.2 by @dependabot in https://github.com/softprops/action-gh-release/pull/467 +* Bump @types/node from 20.14.6 to 20.14.8 by @dependabot in https://github.com/softprops/action-gh-release/pull/469 +* Bump @types/node from 20.14.8 to 20.14.9 by @dependabot in https://github.com/softprops/action-gh-release/pull/473 +* Bump typescript from 5.5.2 to 5.5.3 by @dependabot in https://github.com/softprops/action-gh-release/pull/472 +* Bump ts-jest from 29.1.5 to 29.2.2 by @dependabot in https://github.com/softprops/action-gh-release/pull/479 +* docs: document that existing releases are updated by @jvanbruegge in https://github.com/softprops/action-gh-release/pull/474 + +## 2.0.6 + +- maintenance release with updated dependencies + +## 2.0.5 + +- Factor in file names with spaces when upserting files [#446](https://github.com/softprops/action-gh-release/pull/446) via [@MystiPanda](https://github.com/MystiPanda) +- Improvements to error handling [#449](https://github.com/softprops/action-gh-release/pull/449) via [@till](https://github.com/till) + +## 2.0.4 + +- Minor follow up to [#417](https://github.com/softprops/action-gh-release/pull/417). [#425](https://github.com/softprops/action-gh-release/pull/425) + +## 2.0.3 + +- Declare `make_latest` as an input field in `action.yml` [#419](https://github.com/softprops/action-gh-release/pull/419) + +## 2.0.2 + +- Revisit approach to [#384](https://github.com/softprops/action-gh-release/pull/384) making unresolved pattern failures opt-in [#417](https://github.com/softprops/action-gh-release/pull/417) + +## 2.0.1 + +- Add support for make_latest property [#304](https://github.com/softprops/action-gh-release/pull/304) via [@samueljseay](https://github.com/samueljseay) +- Fail run if files setting contains invalid patterns [#384](https://github.com/softprops/action-gh-release/pull/384) via [@rpdelaney](https://github.com/rpdelaney) +- Add support for proxy env variables (don't use node-fetch) [#386](https://github.com/softprops/action-gh-release/pull/386/) via [@timor-raiman](https://github.com/timor-raiman) +- Suppress confusing warning when input_files is empty [#389](https://github.com/softprops/action-gh-release/pull/389) via [@Drowze](https://github.com/Drowze) + +## 2.0.0 + +- `2.0.0`!? this release corrects a disjunction between git tag versions used in the marketplace and versions list this file. Previous versions should have really been 1.\*. Going forward this should be better aligned. +- Upgrade action.yml declaration to node20 to address deprecations + +## 0.1.15 + +- Upgrade to action.yml declaration to node16 to address deprecations +- Upgrade dependencies +- Add `asset` output as a JSON array containing information about the uploaded assets + +## 0.1.14 + +- provides an new workflow input option `generate_release_notes` which when set to true will automatically generate release notes for you based on GitHub activity [#179](https://github.com/softprops/action-gh-release/pull/179). Please see the [GitHub docs for this feature](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes) for more information + +## 0.1.13 + +- fix issue with multiple runs concatenating release bodies [#145](https://github.com/softprops/action-gh-release/pull/145) + +## 0.1.12 + +- fix bug leading to empty strings subsituted for inputs users don't provide breaking api calls [#144](https://github.com/softprops/action-gh-release/pull/144) + +## 0.1.11 + +- better error message on release create failed [#143](https://github.com/softprops/action-gh-release/pull/143) + +## 0.1.10 + +- fixed error message formatting for file uploads + +## 0.1.9 + +- add support for linking release to GitHub discussion [#136](https://github.com/softprops/action-gh-release/pull/136) + +## 0.1.8 + +- address recent warnings in assert upload api as well as introduce asset upload overrides, allowing for multiple runs for the same release with the same named asserts [#134](https://github.com/softprops/action-gh-release/pull/134) +- fix backwards compatibility with `GITHUB_TOKEN` resolution. `GITHUB_TOKEN` is no resolved first from an env varibale and then from and input [#133](https://github.com/softprops/action-gh-release/pull/133) +- trim white space in provided `tag_name` [#130](https://github.com/softprops/action-gh-release/pull/130) + +## 0.1.7 + +- allow creating draft releases without a tag [#95](https://github.com/softprops/action-gh-release/pull/95) +- Set default token for simpler setup [#83](https://github.com/softprops/action-gh-release/pull/83) +- fix regression with action yml [#126](https://github.com/softprops/action-gh-release/pull/126) + ## 0.1.6 This is a release catch up have a hiatus. Future releases will happen more frequently diff --git a/LICENSE b/LICENSE index ba32e73..2c072b8 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2019 Doug Tangren +Copyright (c) 2019-current Doug Tangren Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/README.md b/README.md index 2090444..6e0622a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ -
i){return null}var r=t.loose?o[x]:o[_];if(!r.test(e)){return null}try{return new SemVer(e,t)}catch(e){return null}}t.valid=valid;function valid(e,t){var r=parse(e,t);return r?r.version:null}t.clean=clean;function clean(e,t){var r=parse(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}t.SemVer=SemVer;function SemVer(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof SemVer){if(e.loose===t.loose){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError("Invalid Version: "+e)}if(e.length>i){throw new TypeError("version is longer than "+i+" characters")}if(!(this instanceof SemVer)){return new SemVer(e,t)}r("SemVer",e,t);this.options=t;this.loose=!!t.loose;var s=e.trim().match(t.loose?o[x]:o[_]);if(!s){throw new TypeError("Invalid Version: "+e)}this.raw=e;this.major=+s[1];this.minor=+s[2];this.patch=+s[3];if(this.major>n||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>n||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>n||this.patch<0){throw new TypeError("Invalid patch version")}if(!s[4]){this.prerelease=[]}else{this.prerelease=s[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t 0){var D=new Array(R+1).join("0");if(b<0)k="-"+D+k.slice(1);else k=D+k}}}d.push(k)}}else{d=[];for(var S=0;SD){r.parser.removeListener("part",onPart);r.parser.on("part",skipPart);e.hitPartsLimit=true;e.emit("partsLimit");return skipPart(t)}if(L){const e=L;e.emit("end");e.removeAllListeners("end")}t.on("header",(function(o){let c;let l;let d;let p;let C;let D;let S=0;if(o["content-type"]){d=i(o["content-type"][0]);if(d[0]){c=d[0].toLowerCase();for(A=0,s=d.length;Ab){const s=b-S+e.length;if(s>0){A.push(e.slice(0,s))}A.truncated=true;A.bytesRead=b;t.removeAllListeners("data");A.emit("limit");return}else if(!A.push(e)){r._pause=true}A.bytesRead=S};G=function(){U=undefined;A.push(null)}}else{if(T===R){if(!e.hitFieldsLimit){e.hitFieldsLimit=true;e.emit("fieldsLimit")}return skipPart(t)}++T;++N;let A="";let s=false;L=t;F=function(e){if((S+=e.length)>w){const r=w-(S-e.length);A+=e.toString("binary",0,r);s=true;t.removeAllListeners("data")}else{A+=e.toString("binary")}};G=function(){L=undefined;if(A.length){A=n(A,"binary",p)}e.emit("field",l,A,false,s,C,c);--N;checkFinished()}}t._readableState.sync=false;t.on("data",F);t.on("end",G)})).on("error",(function(e){if(U){U.emit("error",e)}}))})).on("error",(function(t){e.emit("error",t)})).on("finish",(function(){G=true;checkFinished()}))}Multipart.prototype.write=function(e,t){const A=this.parser.write(e);if(A&&!this._pause){t()}else{this._needDrain=!A;this._cb=t}};Multipart.prototype.end=function(){const e=this;if(e.parser.writable){e.parser.end()}else if(!e._boy._done){process.nextTick((function(){e._boy._done=true;e._boy.emit("finish")}))}};function skipPart(e){e.resume()}function FileStream(e){s.call(this,e);this.bytesRead=0;this.truncated=false}r(FileStream,s);FileStream.prototype._read=function(e){};e.exports=Multipart},855:(e,t,A)=>{"use strict";const s=A(1496);const r=A(2747);const o=A(2393);const i=/^charset$/i;UrlEncoded.detect=/^application\/x-www-form-urlencoded/i;function UrlEncoded(e,t){const A=t.limits;const r=t.parsedConType;this.boy=e;this.fieldSizeLimit=o(A,"fieldSize",1*1024*1024);this.fieldNameSizeLimit=o(A,"fieldNameSize",100);this.fieldsLimit=o(A,"fields",Infinity);let n;for(var a=0,c=r.length;a