feat: add changesets (#81) #1
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: | |
paths: | |
- ".changeset/**" | |
- "packages/**" | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v3 | |
- name: Prepare Environment | |
uses: ./.github/actions/setup-env | |
timeout-minutes: 10 | |
- name: Build | |
run: pnpm build | |
- name: Creating .npmrc file | |
run: | | |
cp .npmrc.example .npmrc | |
sed -i "s/NPM_ACCESS_TOKEN/$NPM_TOKEN/g" .npmrc | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Create Release Pull Request | |
uses: changesets/action@v1 | |
with: | |
publish: pnpm release | |
version: pnpm version-packages | |
commit: 'release: bump package(s)' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |