-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Publish to npm from GitHub actions #12526
Publish to npm from GitHub actions #12526
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/35823/ |
This works 🎉 🎉 🎉 Workflow run: https://github.com/babel/babel/actions/runs/430661855 |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit a7bd3ba:
|
b319288
to
03ac1e2
Compare
This was meant to be used _now_, but I didn't end up using it
03ac1e2
to
fec5242
Compare
fec5242
to
04095c1
Compare
This reverts commit 04095c1.
- name: Build and Test | ||
run: make prepublish | ||
- name: Publish to npm | ||
run: yarn release-tool publish --yes |
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.
Note: This line is the only untested step in this PR (I commented it out, run the action, and everything worked). However, we test in in the e2e tests on CircleCI where we publish to verdaccio.
- name: Checkout the new tag | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 |
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.
Q: Is fetch depth 0-based or 1-based?
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.
It's 1
-based, 0
means "fetch all". We need it in order to find the previous tag.
Closes #10663
During GitHub Universe 2020, they presented environments with manual approval for GitHub actions: regardless of who has write access to this repository, we can now granularly configure who has access to a given secret.
I gave access to @JLHwung, @existentialism, @hzoo and me.
Currently the stored
NPM_TOKEN
is mine, but it it works we should use @babel-bot's.Now the publishing process is just this 🎉
I'm testing this action in the second commit (I'll revert it before merging), publishing an empty package.
This is what the UI looks like: https://drive.google.com/file/d/1q-kCP7rp-7UKZZfChrI3v-s2iVHi0KDE/view