Skip to content

begin core rewrite #122

begin core rewrite

begin core rewrite #122

Workflow file for this run

name: CI
on:
push:
branches: [main]
paths:
- 'packages/**'
tags:
- '[0-9]+.[0-9]+.[0-9]+*'
pull_request:
branches: [main]
paths:
- 'packages/**'
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: pnpm/[email protected]
with:
version: 6.24.2
- uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'pnpm'
- name: Install dependencies
run: pnpm i --frozen-lockfile
- name: Build
run: pnpm build-all
- uses: actions/upload-artifact@v2
with:
name: build-artifacts
path: |
packages/*/cjs
packages/*/esm
packages/*/lib
packages/*/dts
test:
name: Test
runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
# node-version: [12.x, 14.x, 16.x, 17.x]
steps:
- uses: actions/checkout@v2
- uses: pnpm/[email protected]
with:
version: 6.24.2
- uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'pnpm'
- name: Install dependencies
run: pnpm i --frozen-lockfile
- run: pnpm test -- --verbose
publish:
name: 'Publish to NPM'
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.repository == 'brendonovich/sceneify'
needs: [build, test]
steps:
- uses: actions/checkout@v2
- uses: pnpm/[email protected]
with:
version: 6.24.2
- uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'pnpm'
- name: Download build
uses: actions/download-artifact@v2
with:
name: build-artifacts
path: packages
- name: Configure main version
if: github.ref == 'refs/heads/main'
run: pnpm set-package-versions
env:
RELEASE_COMMIT_SHA: ${{ github.sha }}
- name: Publish main to npm
if: github.ref == 'refs/heads/main'
run: pnpm publish -r ${TAG} --no-git-checks --filter "@sceneify/*" --access public
env:
TAG: ${{ (github.ref == 'refs/heads/main' && '--tag=main') || '' }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Configure release version
if: github.ref_type == 'tag'
run: pnpm set-package-versions
- name: Publish release to npm
if: github.ref_type == 'tag'
run: pnpm publish -r ${TAG} --no-git-checks --filter "@sceneify/*" --access public
env:
TAG: ${{ (contains(github.ref_name, '-beta.') && '--tag=beta') || ''}}
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}