Skip to content

chore(root): remove tests from pre-push hooks #327

chore(root): remove tests from pre-push hooks

chore(root): remove tests from pre-push hooks #327

Workflow file for this run

name: publish

Check failure on line 1 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / publish

Invalid workflow file

The workflow is not valid. .github/workflows/publish.yml: (Line: 58, Col: 27, Idx: 1191) - (Line: 58, Col: 31, Idx: 1195): While scanning a plain scalar, find unexpected ':'.
on:
push:
branches:
- master
pull_request:
branches: "*"
jobs:
cache-and-install:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
build:
name: Build Project
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
- name: Install dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Build package
working-directory: ./packages/v3
run: pnpm run build
outputs:
dist-folder: ./packages/v3/dist
test:
name: Build project
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
node-version: [18.x, 20.x, 22.x]
test-plan: [test, test:e2e]
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 [email protected]
- 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 Test Plan
run: pnpm run ${{ matrix.test-plan }}
publish:
name: NPM publish
runs-on: macos-latest
needs: [build]
if: ${{ github.ref == 'refs/heads/master'}}
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "22.x"
- name: Install dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
- 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@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/v3/package.json