mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
parent
5e5fed1deb
commit
8e9970df67
30
.github/workflows/publish-on-tag.yml
vendored
Normal file
30
.github/workflows/publish-on-tag.yml
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
name: publish-on-tag
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
- name: Build
|
||||
run: npm run build
|
||||
- name: Publish puppeteer
|
||||
env:
|
||||
NPM_TOKEN: ${{secrets.NPM_TOKEN_PUPPETEER}}
|
||||
run: |
|
||||
npm config set '//wombat-dressing-room.appspot.com/:_authToken' '${NPM_TOKEN}'
|
||||
npm publish
|
||||
- name: Publish puppeteer-core
|
||||
env:
|
||||
NPM_TOKEN: ${{secrets.NPM_TOKEN_PUPPETEER_CORE}}
|
||||
run: |
|
||||
utils/prepare_puppeteer_core.js
|
||||
npm config set '//wombat-dressing-room.appspot.com/:_authToken' '${NPM_TOKEN}'
|
||||
npm publish
|
2
.npmrc
Normal file
2
.npmrc
Normal file
@ -0,0 +1,2 @@
|
||||
registry=https://wombat-dressing-room.appspot.com/
|
||||
access=public
|
@ -286,17 +286,8 @@ Releasing to npm consists of the following phases:
|
||||
7. Once merged, publish the release notes using [GitHub's “draft new release tag” option](https://github.com/puppeteer/puppeteer/releases/new).
|
||||
- **NOTE**: tag names are prefixed with `'v'`, e.g. for version `1.4.0` the tag is `v1.4.0`.
|
||||
- For the “raw notes” section, use `git log --pretty="%h - %s" v2.0.0..HEAD`.
|
||||
2. Publish `puppeteer` to npm.
|
||||
1. On your local machine, pull from [upstream](https://github.com/puppeteer/puppeteer) and make sure the last commit is the one just merged.
|
||||
2. Run `git status` and make sure there are no untracked files.
|
||||
- **WHY**: this is to avoid adding unnecessary files to the npm package.
|
||||
3. Run [`npx pkgfiles`](https://www.npmjs.com/package/pkgfiles) to make sure you don't publish anything unnecessary.
|
||||
4. Run `npm publish`. This publishes the `puppeteer` package.
|
||||
3. Publish `puppeteer-core` to npm.
|
||||
1. Run `./utils/prepare_puppeteer_core.js`. The script changes the name inside `package.json` to `puppeteer-core`.
|
||||
2. Run `npm publish`. This publishes the `puppeteer-core` package.
|
||||
3. Run `git reset --hard` to reset the changes to `package.json`.
|
||||
4. Source Code: mark post-release.
|
||||
8. As soon as the Git tag is created by completing the previous step, our CI automatically `npm publish`es the new releases for both the `puppeteer` and `puppeteer-core` packages.
|
||||
2. Source Code: mark post-release.
|
||||
1. Bump `package.json` version to `-post` version, run `npm run doc` to update the “released APIs” section at the top of `docs/api.md` accordingly, and send a PR titled `'chore: bump version to vXXX.YYY.ZZZ-post'` ([example](https://github.com/puppeteer/puppeteer/commit/d02440d1eac98028e29f4e1cf55413062a259156))
|
||||
- **NOTE**: no other commits should be landed in-between release commit and bump commit.
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
"lint": "npm run eslint && npm run tsc && npm run doc && npm run commitlint",
|
||||
"doc": "node utils/doclint/cli.js",
|
||||
"clean-lib": "rm -rf lib",
|
||||
"build": "npm run tsc",
|
||||
"tsc": "npm run clean-lib && tsc --version && npm run tsc-cjs && npm run tsc-esm",
|
||||
"tsc-cjs": "tsc -b src/tsconfig.cjs.json",
|
||||
"tsc-esm": "tsc -b src/tsconfig.esm.json",
|
||||
|
Loading…
Reference in New Issue
Block a user