mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix: process documentation during publishing (#8433)
This commit is contained in:
60
.github/workflows/publish.yml
vendored
60
.github/workflows/publish.yml
vendored
@@ -3,10 +3,36 @@ name: Publish
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
- v*
|
||||
|
||||
jobs:
|
||||
pre-publish:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: main
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
- name: Build
|
||||
run: |
|
||||
node utils/generate_version_file.js
|
||||
IS_PRE_RELEASE=1 npm run doc
|
||||
- name: Configure git
|
||||
run: |
|
||||
git config --global user.name 'actions-bot'
|
||||
git config --global user.email '<github-actions-bot@google.com>'
|
||||
- name: Commit and push
|
||||
run: |
|
||||
git add -A
|
||||
git commit -m "chore: freeze current version in code"
|
||||
git push
|
||||
|
||||
publish:
|
||||
needs: pre-publish
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -17,6 +43,8 @@ jobs:
|
||||
run: npm install
|
||||
- name: Build puppeteer
|
||||
run: npm run build
|
||||
- name: Generate release documentation
|
||||
run: IS_RELEASE=1 npm run doc
|
||||
- name: Publish puppeteer
|
||||
env:
|
||||
NPM_TOKEN: ${{secrets.NPM_TOKEN_PUPPETEER}}
|
||||
@@ -36,33 +64,3 @@ jobs:
|
||||
npm config set registry 'https://wombat-dressing-room.appspot.com/'
|
||||
npm config set '//wombat-dressing-room.appspot.com/:_authToken' '${NPM_TOKEN}'
|
||||
npm publish
|
||||
|
||||
post-publish:
|
||||
needs: publish
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: main
|
||||
- name: Append `-post` to version
|
||||
id: post-version
|
||||
run: |
|
||||
npm version --no-git-tag-version --no-commit-hooks "$(jq -r .version ./package.json)-post"
|
||||
echo ::set-output name=VERSION::$(jq -r .version ./package.json)
|
||||
- name: Build
|
||||
run: |
|
||||
npm install
|
||||
npm run build
|
||||
npm run doc
|
||||
- name: Configure git
|
||||
run: |
|
||||
git config --global user.name 'actions-bot'
|
||||
git config --global user.email '<github-actions-bot@google.com>'
|
||||
- name: Commit and push
|
||||
run: |
|
||||
git add -A
|
||||
git commit -m "chore: bump version to ${{ steps.post-version.outputs.VERSION }}"
|
||||
git push
|
||||
|
||||
Reference in New Issue
Block a user