Skip to content

fix crash when calling highlight on an xpath locator #135

fix crash when calling highlight on an xpath locator

fix crash when calling highlight on an xpath locator #135

name: test-and-publish
on:
- push
permissions:
id-token: write
pages: write
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 16.9.1
- run: npm run setup
- run: npm run check
- name: upload compiled code
uses: actions/upload-artifact@v3
with:
name: build
path: dist
env:
CI: true
- name: upload playwright report
uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
- uses: actions/configure-pages@v3
if: always()
- name: Upload playwright report to github pages
uses: actions/upload-pages-artifact@v2
if: always()
with:
path: playwright-report/
- name: Deploy playwright report to Github Pages
if: always()
id: deployment
uses: actions/deploy-pages@v2
with:
# this doesnt work yet so there can only be one deployed playwright report at a time across all PRs
# https://github.com/actions/deploy-pages/issues/180
preview: true
- name: trace report url
if: always()
run: echo "# [click here to view the playwright report](https://detachhead.github.io/playwright-ui5)" >> $GITHUB_STEP_SUMMARY
publish:
name: publish
runs-on: ubuntu-latest
needs: build-and-test
# https://github.com/marvinpinto/actions/issues/340#issuecomment-983254674
permissions:
id-token: write
pages: write
contents: write
packages: write
pull-requests: read
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v3
with:
node-version: 16.9.1
- run: echo ::set-output name=CURRENT_VERSION::$(node -p "require(\"./package.json\").version")
id: current-version
- if: github.ref == 'refs/heads/master'
run: echo ::set-output name=VERSION_INFO::$(npm view $(node -p "require(\"./package.json\").name")@=${{ steps.current-version.outputs.CURRENT_VERSION }})
id: version-was-changed
- uses: actions/download-artifact@v3
# need to publish if the branch isn't master, or it is master and the version in package.json hasn't been published yet
if: github.ref != 'refs/heads/master' || steps.version-was-changed.outputs.VERSION_INFO == ''
with:
name: build
path: dist
# publish canary version on every push to every branch except master
- name: canary version
if: github.ref != 'refs/heads/master'
run: npm version ${{ steps.current-version.outputs.CURRENT_VERSION }}-$GITHUB_SHA --git-tag-version false
- name: canary publish
if: github.ref != 'refs/heads/master'
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
access: public
tag: canary
# publish & github release if master, and the version in package.json was changed
- name: publish
if: github.ref == 'refs/heads/master' && steps.version-was-changed.outputs.VERSION_INFO == ''
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
access: public
- run: echo ::set-output name=PACKAGE::$(npm pack)
id: package
if: github.ref == 'refs/heads/master' && steps.version-was-changed.outputs.VERSION_INFO == ''
- uses: marvinpinto/[email protected]
if: github.ref == 'refs/heads/master' && steps.version-was-changed.outputs.VERSION_INFO == ''
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: false
files: ${{ steps.package.outputs.PACKAGE }}
automatic_release_tag: ${{ steps.current-version.outputs.CURRENT_VERSION }}