Skip to content

Release

Release #1888

Workflow file for this run

name: Release
on:
workflow_run:
workflows: ['Tests', 'Storybook Tests']
branches: [main]
types:
- completed
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 'lts/*'
- name: Set yarn version
run: yarn set version 4.1.1
- name: Install dependencies
run: yarn install
- name: Run pre-publish script
run: yarn prepublish
- name: Commit changes made by the prepublish script
run: |
git config --global user.name 'GitHub Action'
git config --global user.email '[email protected]'
git add .
git commit -m "chore: run prepublish script" || true
git push origin main
- name: Build
run: yarn build
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}