feat: add doc #79
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
push: | |
branches: | |
- master | |
env: | |
CI: true | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
jobs: | |
release: | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout code repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: setup node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 14 | |
- name: setup npmrc | |
run: | | |
echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' >> .npmrc | |
- name: setup pnpm | |
uses: pnpm/[email protected] | |
with: | |
version: latest | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
run: | | |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" | |
- uses: actions/cache@v3 | |
name: Setup pnpm cache | |
with: | |
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: pnpm install --no-frozen-lockfile | |
- name: prepare for publish | |
run: | | |
pnpm whoami | |
pnpm lint | |
pnpm t | |
- name: create and publish versions | |
uses: changesets/action@master | |
with: | |
commit: "chore: update versions" | |
publish: pnpm release | |
version: pnpm ci:version | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |