Skip to content

Merge pull request #59 from phjardas/changeset-release/main #145

Merge pull request #59 from phjardas/changeset-release/main

Merge pull request #59 from phjardas/changeset-release/main #145

Workflow file for this run

name: Test
on:
push: {}
# Trigger this workflow on PRs created by Changesets by assigning it to
# someone. We need this workaround because PRs created by GitHub Actions do
# not trigger workflows per default.
pull_request:
branches:
- main
types:
- assigned
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: npm
cache-dependency-path: |
package-lock.json
packages/*/package-lock.json
- run: npm ci
- run: npm run bootstrap
- name: Test
run: npm run test:coverage
- uses: paambaati/[email protected]
with:
coverageLocations: ${{github.workspace}}/packages/*/coverage/lcov.info:lcov
env:
CC_TEST_REPORTER_ID: c7d52ac19fe2a35588d2f41c0776e3565e05fd0e5819e40a5d4b41a2cdf4edcd
- name: Build
run: npm run build
- name: Create release pull request or publish to npm
if: github.ref == 'refs/heads/main'
uses: changesets/action@c2918239208f2162b9d27a87f491375c51592434
with:
publish: npx changeset publish
title: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}