Skip to content

fix(v3): remove exposed instances because they are always undefined a… #279

fix(v3): remove exposed instances because they are always undefined a…

fix(v3): remove exposed instances because they are always undefined a… #279

Workflow file for this run

name: publish
on:
push:
branches:
- master
pull_request:
branches: "*"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [18.x, 20.x, 21.x]
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
- name: Create env file
run: |
touch ./packages/v3/cypress/runner/.env
echo VITE_GOOGLE_API_KEY=${{ secrets.VITE_GOOGLE_API_KEY }} >> ./packages/v3/cypress/runner/.env
- name: Run tests
run: pnpm run test
- name: Run e2e tests
run: pnpm run test:e2e
publish:
name: npm publish
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/master'}}
needs: [build]
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install pnpm
run: npm install --location=global pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Build package
working-directory: ./packages/v3
run: pnpm run build
- name: Configure git credentials
uses: OleksiyRudenko/gha-git-credentials@v2-latest
with:
global: true
name: "${{ secrets.GH_USER }}"
email: "${{ secrets.GH_EMAIL }}"
actor: "${{ secrets.GH_FULL_NAME }}"
token: "${{ secrets.GH_TOKEN_REPO }}"
- name: Update origin push URI
run: |
git remote set-url origin "https://${{ secrets.GH_TOKEN_REPO }}@github.com/${{ secrets.GH_USER }}/${{ secrets.GH_REPOSITORY }}.git" > /dev/null 2>&1
git checkout master
- name: Preparing new release
working-directory: ./packages/v3
run: pnpm run release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_REPO }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
CI: true
- name: Publish new version to npm
uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/v3/package.json