mirror of
https://github.com/tenrok/BBob.git
synced 2026-05-21 13:24:05 +03:00
3575982b28
* feat: initial pnpm support * feat: lock files * fix: github actions * fix: lerna bootstrap * fix: lerna useWorkspaces * fix: lerna no ci * fix: lint * fix: audit * chore: changeset * fix: publish action
57 lines
1.4 KiB
YAML
57 lines
1.4 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
NODE_OPTIONS: --max-old-space-size=4096
|
|
outputs:
|
|
published: ${{ steps.changesets.outputs.published }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version-file: '.nvmrc'
|
|
cache: 'npm'
|
|
|
|
- name: Install PNPM
|
|
uses: pnpm/action-setup@v2
|
|
with:
|
|
version: 8
|
|
run_install: false
|
|
|
|
- name: Get pnpm store directory
|
|
shell: bash
|
|
run: |
|
|
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
|
|
|
- uses: actions/cache@v3
|
|
name: Setup pnpm cache
|
|
with:
|
|
path: ${{ env.STORE_PATH }}
|
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pnpm-store-
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Create Release Pull Request or Publish to npm
|
|
id: changesets
|
|
uses: changesets/action@v1
|
|
with:
|
|
publish: npm run release
|
|
commit: 'chore(release): release'
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|