Merge pull request #1022 from jeevcat/master #16
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 | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
- name: Read .nvmrc | |
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)" | |
id: nvm | |
- name: Use Node.js (.nvmrc) | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "${{ steps.nvm.outputs.NVMRC }}" | |
- name: Install PNPM | |
uses: pnpm/action-setup@v2 | |
with: | |
version: latest | |
- name: Install Dependencies | |
run: pnpm install | |
- name: Create Release Pull Request | |
uses: changesets/action@v1 | |
id: changesets | |
with: | |
# This expects you to have a script called release which does a build for your packages and calls changeset publish | |
publish: pnpm release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: publish storybook | |
if: steps.changesets.outputs.published == 'true' | |
run: pnpm release:storybook |