-
Notifications
You must be signed in to change notification settings - Fork 1
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
Rewrite preview action in Node #65
Conversation
89af8ba
to
750b213
Compare
bc4e68e
to
fcebdbc
Compare
ac6805e
to
2fbee67
Compare
497bebb
to
cc69151
Compare
cc69151
to
292c24f
Compare
292c24f
to
3b51f33
Compare
08f6db7
to
7320ba9
Compare
2afd33f
to
8728263
Compare
a6799ce
to
c427b05
Compare
4fac799
to
74aad74
Compare
50127d7
to
e54b243
Compare
e54b243
to
fd7049f
Compare
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.
Is this almost ready to go? Curious. How do we handle the publishing based on the presence of a preview
label?
I just need to add some informative console logs here and there and it will be good to go. In terms of publishing from an existing prerelease, we originally planned for something along the lines of
|
5a431de
to
02cdcac
Compare
169e735
to
070bf5f
Compare
070bf5f
to
d513607
Compare
Oh I forgot to answer your question. This can be done from the workflow. I could've incorporated it into the action but using the workflow prevents having to build the action so we'll save time. |
Motivation
To finally rewrite the
publish-pr-preview
action in typescript.Approach
What's New?
IGNORE
andNPM_PUBLISH
optionsIGNORE
was originally for us to prevent publishing our gatsby/docusaurus website directories but we have them marked asprivate
packages and the action will skip overprivate
packages anywayNPM_PUBLISH
was to give developers the option to useyarn publish
but I think we're just usingnpm publish
so it's not necessary for us to have this option... I think.npmrc
files. We're lettingactions/setup-node
take care of all of thatBEFORE_ALL
withINSTALL_SCRIPT
yarn install
and thenBEFORE_ALL
before proceeding on to publishing but now we just combined the two so it's either justyarn install
oruser-specified install script
. This just means users need to configureINSTALL_SCRIPT: yarn install && yarn other stuff
if they need to run additional steps_
with__
and/
with_
but I found out underscore is not valid for semver prerelease identifiers so we're now replacing both_
and/
with-
instead1.0.0
=>1.0.0-abcdefgh
(SHA)1.0.0
=>1.0.1-branch.0
(branch name as prerelease identifier with increments)1.0.0
but if1.2.3
was released and I haven't had a chance to rebase yet, the action will publish1.2.4-branch.0
.yarn add
if there'syarn.lock
in project,npm install
by defaultPublishing Tested
1.15.0
published1.15.1-mk-preview-js.0
1.15.1-mk-preview-js.1
npm view tag
to detect that.0
was already published so it incremented up to.1
1.16.0
and ran action and it published1.16.1-mk-preview-js.0
from1.15.0
.0
again because we never published a preview for1.16.1-x
1.16.1-mk-preview-js.1
and forcedincreaseFrom
as1.16.0
to test multiple attempt functionality1.16.1-mk-preview-js.2
after attempting to publish.0
and.1
.0
,.1
, and.2
increaseFrom
of1.16.0
and action published1.16.1-mk-preview-js.3
TODOs
Once this PR is merged, we can use this action by calling it from the
main
branch:But I would like to rewrite the other actions too so that we can officially release everything as
v2
.