-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add release-notes
output
#28
add release-notes
output
#28
Conversation
Ensure all text files use LF, even on Windows, so as to avoid newline headaches when running tests.
ImportantI could not get
I spent 15 minutes trying to fix this mess and then remembered why I never wanted to touch these shenanigans ever again, so
|
We need to update that if we want to use this feature though! Unfortunately, GitHub cannot natively execute TS in its actions and it is always the compiled JS that gets executed. |
This is a |
Apparently it is an issue with an outdated Node version, so perhaps a dependency upgrade can fix it? |
Yea this what I tried to do initially but gave up when I saw the mess, I honestly don't want to ever again touch anything like that, I've been |
BTW not really related to the PR, but while we're at it and complaining about > yarn format-check
yarn run v1.22.22
$ prettier --check **/*.ts
Checking formatting...
__tests__\fixtures\empty_release\fixture.ts
__tests__\fixtures\first_release\fixture.ts
__tests__\fixtures\lowercase_link_reference\fixture.ts
__tests__\fixtures\standard\fixture.ts
__tests__\fixtures\tag_on_tag\fixture.ts
__tests__\fixtures\tag_release\fixture.ts
__tests__\getReleaseNotes.test.ts
__tests__\updateChangelog.test.ts
src\getReleaseNotes.ts
src\updateChangelog.ts
types\mock-env\index.d.ts
types\to-vfile\index.d.ts
Code style issues found in the above file(s). Forgot to run Prettier? And also seemed like ESLint was complaining about its setup: > yarn lint
yarn run v1.22.22
$ eslint src/**/*.ts
Oops! Something went wrong! :(
ESLint: 5.16.0.
ESLint couldn't find the plugin "eslint-plugin-prettier". This can happen for a couple different reasons:
1. If ESLint is installed globally, then make sure eslint-plugin-prettier is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.
2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
npm i eslint-plugin-prettier@latest --save-dev
Path to ESLint package: C:\Workspace\Programming\GitHub\keep-a-changelog-new-release\node_modules\eslint
If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.
error Command failed with exit code 2. |
OK I bit the bullet and decided to go the full stupid route: I downgraded Node to v16.20.2 (instead of using the latest LTS like any sane person would do), and I can now run |
Move Markdown node definitions to types, as we will be reusing them in another file in the next commit.
Add a new `release-notes` output to the action containing the release notes for the newly released versions, allowing consumers to leverage it in their workflows (e.g. by passing it down to the GitHub Release API).
92915a2
to
a700c0f
Compare
Rebased the commits and added an updated build of |
Tests are still passing: > yarn test
yarn run v1.22.22
$ jest
PASS __tests__/updateChangelog.test.ts
√ should update empty_release changelog (16ms)
√ should update standard changelog (4ms)
√ should update first_release changelog (2ms)
√ should update lowercase_link_reference changelog (3ms)
√ should update tag_release changelog (4ms)
√ should update tag_on_tag changelog (3ms)
PASS __tests__/getGenesisHash.test.ts
√ should return a hash (40ms)
PASS __tests__/getReleaseNotes.test.ts
√ should extract empty_release release-notes output (4ms)
√ should extract standard release-notes output (2ms)
√ should extract first_release release-notes output (2ms)
√ should extract lowercase_link_reference release-notes output (1ms)
√ should extract tag_release release-notes output (2ms)
√ should extract tag_on_tag release-notes output (2ms)
PASS __tests__/getInputs.test.ts
√ version or tag is required (6ms)
√ tag is used before version
√ version fallback works (1ms)
√ can parse prefixed tag
√ date is optional but has a default
√ parses date into ISO8601 (1ms)
√ parses GITHUB_REPOSITORY into owner and repo
√ can handle ISO8601 date
√ changelog path is optional but has a default
√ parse changelog path from input
PASS __tests__/formatDate.test.ts
√ should format 'Dec 09 2019' as '2019-12-09'
√ should format 'Dec 16 2019' as '2019-12-16'
√ should format 'Jan 09 2019' as '2019-01-09'
Test Suites: 5 passed, 5 total
Tests: 26 passed, 26 total
Snapshots: 0 total
Time: 1.083s
Ran all test suites.
::warning::Version argument will be deprecated soon, use tag instead.
Done in 1.67s. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay! Thank you for the contribution :)
You should be able to depend on latest |
OK I'll probably release something in the next couple days, will let you know. |
It works fine. Here's an example of a successful run using Relevant tidbits:
Result: https://github.com/nbusseneau/LotusEcarlateChanges/releases/tag/0.6.40 |
Awesome, thanks! Will release tomorrow. |
@thomaseizinger / @nbusseneau do we as users need to do anything to take advantage of this? |
I am not sure I understand your question? Starting with this PR, the action emits an output called See @nbusseneau's workflow file: https://github.com/nbusseneau/LotusEcarlateChanges/actions/runs/10057749177/workflow#L64 |
@thomaseizinger - sorry I understand now. |
Add a new
release-notes
output to the action containing the release notes for the newly released versions, allowing consumers to leverage it in their workflows (e.g. by passing it down to the GitHub Release API).Closes: #27