Merge branch 'main' of https://github.com/zhinjs/zhin #258
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: CI | |
on: | |
push: | |
branches: | |
- main | |
env: | |
CI: true | |
PNPM_CACHE_FOLDER: .pnpm-store | |
jobs: | |
version: | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
steps: | |
- name: setup node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16.x | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 7 | |
- name: setup pnpm config | |
run: pnpm config set store-dir $PNPM_CACHE_FOLDER | |
- name: install dependencies | |
run: pnpm install | |
env: | |
GITHUB_AUTH_TOKEN: ${{secrets.PERSONAL_TOKEN}} | |
- name: bump versions | |
uses: changesets/action@v1 | |
id: changesets | |
with: | |
version: npm run bump | |
commit: "chore: update versions" | |
title: "chore: update versions" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: google-github-actions/release-please-action@v3 | |
id: release | |
with: | |
release-type: node | |
- name: build packages | |
run: npm run build | |
if: ${{ steps.release.outputs.release_created }} | |
- name: publish packages | |
if: ${{ steps.release.outputs.release_created }} | |
run: npm run pub | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |