65 lines
1.4 KiB
YAML
65 lines
1.4 KiB
YAML
name: Publish
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
env:
|
|
CI: true
|
|
PNPM_CACHE_FOLDER: .pnpm-store
|
|
|
|
jobs:
|
|
version:
|
|
timeout-minutes: 15
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
node: [14]
|
|
|
|
steps:
|
|
- name: Checkout 🛎
|
|
uses: actions/checkout@master
|
|
|
|
- name: Setup node env 🏗
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
check-latest: true
|
|
|
|
- uses: pnpm/action-setup@v2.2.2
|
|
name: Install pnpm
|
|
with:
|
|
version: 7
|
|
run_install: false
|
|
|
|
- name: Setup pnpm config 🏗
|
|
run: pnpm config set store-dir $PNPM_CACHE_FOLDER
|
|
|
|
- name: Setup npmrc 🏗
|
|
run: echo "\n//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc
|
|
|
|
- name: Install dependencies 👨🏻💻
|
|
run: pnpm install --no-frozen-lockfile
|
|
|
|
- name: Run linter 🧹
|
|
run: pnpm lint
|
|
|
|
- name: Build Library 👷
|
|
run: pnpm build
|
|
|
|
- name: Run tests 🧪
|
|
run: pnpm test
|
|
|
|
- name: Bump versions 🏷 and Publish 🚀
|
|
uses: changesets/action@v1
|
|
with:
|
|
version: pnpm ci:version
|
|
commit: "chore: bump versions"
|
|
title: "chore: bump versions"
|
|
publish: pnpm ci:publish
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|