fix: resolve duplex error when fetching with stream body (#167) #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
Release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: main | |
fetch-depth: 0 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "14" | |
registry-url: "https://registry.npmjs.org" | |
- name: reset gh-pages to main | |
run: | | |
git checkout gh-pages | |
git reset --hard main | |
- name: replace package.json version | |
run: | | |
tag=${{github.ref_name}} | |
version=${tag:1} | |
sed -i "s/0.0.0-git-tag/$version/" package.json | |
- name: install dependencies | |
run: npm ci | |
env: | |
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1" | |
- name: npm build | |
run: | | |
npm run build | |
- name: publish to npm | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Push to gh-pages | |
run: | | |
# gh-pages branch should contain dist files | |
sed -i '/dist\//d' .gitignore | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add . | |
git commit -m "release ${{github.ref_name}}" --no-verify | |
git push -f |