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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add release workflow #387

Merged
merged 2 commits into from
Dec 28, 2022
Merged

Add release workflow #387

merged 2 commits into from
Dec 28, 2022

Conversation

paescuj
Copy link
Collaborator

@paescuj paescuj commented Nov 18, 2022

Adding a simple GitHub workflow which does create a GitHub release (with auto-generated changelog) and publish the NPM package on push of version tags.

With this workflow the process would then look as follows:

  1. Run npm version ... locally
  2. Push to GitHub, e.g. git push && git push --tags
  3. Let the workflow do the rest (and maybe check / adjust the release notes)

I've added safe-publish-latest as a safety measure, which makes sure the publish process will only run if the version is a valid "latest" version.

@gustavohenke This would allow me to create releases as well. Feel free to close this pull request in case you prefer to retain the sole person to do so. Otherwise, can you please create a "NPM Automation Access Token" and store it under a secret called NPM_TOKEN in this repo. Thanks!

@paescuj paescuj marked this pull request as ready for review November 19, 2022 14:29
Copy link
Member

@gustavohenke gustavohenke left a comment

Choose a reason for hiding this comment

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

Thanks, the idea is good!

...I have write access to a couple of other popular packages though, so I'd like to have this first:
github/roadmap#557

CONTRIBUTING.md Show resolved Hide resolved
@paescuj
Copy link
Collaborator Author

paescuj commented Nov 20, 2022

Thanks, the idea is good!

...I have write access to a couple of other popular packages though, so I'd like to have this first: github/roadmap#557

Oh, of course! I'm surprised that this is still not solved. It's scheduled for Q4 so let's hope we'll have it by the end of the year... 🎉

@paescuj
Copy link
Collaborator Author

paescuj commented Dec 9, 2022

Granular access tokens are now available (beta): https://github.blog/changelog/2022-12-06-limit-scope-of-npm-tokens-with-the-new-granular-access-tokens/
Unfortunately, the max expiration date is limited to 365 days which seems to be a bit of a blocker for me when using it in workflows...
Maybe this will change once released under general availability: github/roadmap#556

Copy link
Member

@gustavohenke gustavohenke left a comment

Choose a reason for hiding this comment

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

I've gotten access to the granular tokens and added one under NPM_TOKEN.

Unfortunately, the max expiration date is limited to 365 days

We can get started with this limit 🙂 one year is enough time to see a lot of changes.

@paescuj
Copy link
Collaborator Author

paescuj commented Dec 28, 2022

I've gotten access to the granular tokens and added one under NPM_TOKEN.

That's a great "End of Year" gift 🎉 Thank you!

We can get started with this limit 🙂 one year is enough time to see a lot of changes.

Hah, true 😃 Let's see how things evolve!

@paescuj paescuj merged commit a6fc612 into open-cli-tools:main Dec 28, 2022
@paescuj paescuj deleted the release-workflow branch December 28, 2022 23:35
@paescuj
Copy link
Collaborator Author

paescuj commented Mar 28, 2023

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

2 participants