chore(release): npm release (#106) #74
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: Publish NPM Package | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
environment: CI | |
env: | |
TENDERLY_ACCESS_KEY: ${{secrets.TENDERLY_ACCESS_KEY}} | |
TENDERLY_ACCOUNT_NAME: ${{secrets.TENDERLY_ACCOUNT_NAME}} | |
TENDERLY_PROJECT_NAME: ${{secrets.TENDERLY_PROJECT_NAME}} | |
TENDERLY_GET_BY_PROJECT_NAME: ${{secrets.TENDERLY_GET_BY_PROJECT_NAME}} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/[email protected] | |
with: | |
version: 8.2.0 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: "pnpm" | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm lint | |
- run: pnpm build | |
- run: pnpm test | |
publish-npm: | |
needs: build | |
runs-on: ubuntu-latest | |
environment: CI | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/[email protected] | |
with: | |
version: 8.2.0 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: "pnpm" | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm build | |
- name: Create Release Pull Request or Publish | |
id: changesets | |
uses: changesets/action@v1 | |
with: | |
publish: pnpm run publish | |
commit: "chore(release): npm release" | |
title: "Release" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |