-
Notifications
You must be signed in to change notification settings - Fork 66
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
Update publish workflow. #554
Conversation
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.
The only unclear thing for me is that expected that you will publish also on draft releases, or this situation is impossible? Otherwise relying on your experience
@@ -8,6 +8,7 @@ on: | |||
description: Which branch to deploy to peggyjs.org | |||
required: true | |||
options: | |||
- main |
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.
If I correctly understand documentation, this creates a choice widget with two values "main" and "stable" when you run workflow from UI or requires parameter with two possible values when you trigger workflow using some tool? It is unclear for me how that inputs will be provided
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.
The gh-pages
workflow might be deleted after we fully switch over. I want to leave it in place for the short term so that I can easily re-publish just the docs if something goes wrong.
The input is provided when you run the gh-pages workflow manually. The Actions section of the GitHub repository provides a mechanism for running the action and for gathering the input from the person requesting the action be run.
on: | ||
release: | ||
types: [published] |
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.
This will also trigger for draft releases:
A release, pre-release, or draft of a release was published.
Is this what was expected?
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.
This will also trigger for draft releases:
A release, pre-release, or draft of a release was published.
Is this what was expected?
Yes. There are several projects I use that do pre-releases all the way into NPM. npm info eslint versions
for an example.
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/peggyjs/peggy.git" | ||
}, |
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.
This is a new preferred way to specify repositories? What the advantages over the previous format?
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.
Another great question. If you do npm pkg fix
it will switch your repository to this format. This format is what is used by the provenance mechanism of npm publish
. If you use the simpler format, npm will make this change at publish time and give a warning telling you to run npm pkg fix
.
.github/workflows/publish.yml
Outdated
permissions: | ||
contents: write | ||
id-token: write |
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.
Would be good to add comments why this is needed
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.
willfix
The type of release is set in two places. One is The second is when you do the release, either with Good question, and I'm glad that we have the workflow handy in case we need it. |
I think I'll also do a 4.1 pre-release to test this out, when I'm ready. |
Seeing no further comments, I'm going to land this. We can revisit as needed if anyone has other insights. |
Fixes #552