46 lines
945 B
YAML
46 lines
945 B
YAML
name: Release
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- uses: pnpm/action-setup@v2.1.0
|
|
with:
|
|
version: 6.32.0
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: '14'
|
|
registry-url: 'https://registry.npmjs.org'
|
|
|
|
- name: Cache pnpm modules
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/.pnpm-store
|
|
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
|
|
- name: Package
|
|
run: pnpm package
|
|
|
|
- name: Publish
|
|
run: |
|
|
cd package
|
|
pnpm version patch
|
|
pnpm publish --no-git-checks
|
|
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|