Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert travis to github actions #803

Merged
merged 2 commits into from Aug 21, 2023

Conversation

a-rothwell
Copy link
Contributor

@a-rothwell a-rothwell commented May 27, 2023

Hey 馃憢馃徎 ,

This PR adds a github action to publish depcheck to the npm registry.
This is a requested feature per #800 (comment)

To run this in your fork just add an npm access token to the "Actions secrets and variables" section in the project settings.
Example

To create a new release we just have to create a new semver compatible tag and publish.
https://github.com/a-rothwell/depcheck/releases/tag/123.456.789
Screen Shot of new release

This then kicks off a new action which builds, tests, and publishes the new version
Screen shot of action

Resulting NPM page https://www.npmjs.com/package/arothwell-ci-test-depcheck?activeTab=versions
Screen shot of NPM package published

strategy:
matrix:
os: [ubuntu-latest]
node-version: [18.x]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
node-version: [18.x]
node-version: [10.x, 20.x]

Oldest supported + current covers both ends of supported version range

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that we should test on both ends of the range before publishing.
I have updated the action to test with both node 10 and node 18 and then finally build with node 18 and publish once both tests pass.

I think we should wait to use node 20 until we've added it to the test suite that runs on every PR.
I created a PR to add that here #804
I think that is inline with getting a version 1.5.0 published as you mentioned here: #800 (comment)

@rumpl
Copy link
Member

rumpl commented Jul 17, 2023

image

Thanks for this, I'll take a closer look at this very soon and try to use it to release a new version of depcheck

@legobeat
Copy link
Contributor

Thanks for this, I'll take a closer look at this very soon and try to use it to release a new version of depcheck

Appreciate it @rumpl ! #801 would love some attention as well

@miluoshi
Copy link
Collaborator

As the Node.js v14 is the latest so far maintained version, shouldn't both the node-version in publish.yml and engines.node in package.json be updated to reflect that? That would mean a breaking change though

@legobeat
Copy link
Contributor

legobeat commented Jul 26, 2023

As the Node.js v14 is the latest so far maintained version, shouldn't both the node-version in publish.yml and engines.node in package.json be updated to reflect that? That would mean a breaking change though

Indeed! My above comment is asking for merging and releasing non-breaking maintenance- and security updates for a minor release prior to what you are describing. This would propagate those fixes to dependents on e.g. ^1.4.3 without requiring most users and downstream library maintainers to take explicit action.

@rumpl rumpl merged commit 6c8f1b8 into depcheck:main Aug 21, 2023
3 checks passed
@rumpl
Copy link
Member

rumpl commented Aug 21, 2023

Okay, merged this, will create a new version later today, fingers crossed

@rumpl
Copy link
Member

rumpl commented Aug 21, 2023

@rumpl
Copy link
Member

rumpl commented Aug 21, 2023

Aand it failed 馃槶

@rumpl
Copy link
Member

rumpl commented Aug 21, 2023

Wooohooo!! Thanks everyone! https://www.npmjs.com/package/depcheck/v/1.4.5

I'll update the changelog.

<3

@legobeat
Copy link
Contributor

@rumpl Right on! Think we can get #798 and #801 in for a patch next up as well?

@rumpl
Copy link
Member

rumpl commented Aug 22, 2023

@legobeat for sure! Now that the release pipeline is back up we can do everything :)

once again, massive thanks to everyone for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants