Merge pull request #96 from jasonrundell/feature/allow-spread-props #81
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 of our action | |
name: Release | |
# The event that will trigger the action | |
on: | |
push: | |
branches: [main] | |
# what the action will do | |
jobs: | |
release: | |
# The operating system it will run on | |
runs-on: ubuntu-latest | |
# This check needs to be in place to prevent a publish loop with auto and github actions | |
if: | | |
github.event_name == 'push' && | |
github.ref == 'refs/heads/main' && | |
!contains(github.event.head_commit.message, 'ci skip') && | |
!contains(github.event.head_commit.message, 'skip ci') | |
# The list of steps that the action will go through | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Prepare repository | |
run: git fetch --unshallow --tags | |
- name: Use Node.js 20 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 20 | |
- name: Cache node modules | |
uses: actions/cache@v1 | |
with: | |
path: node_modules | |
# package-lock.json is used for npm ci | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Create Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
#👇 npm token, see https://storybook.js.org/tutorials/design-systems-for-developers/react/en/distribute/ to obtain it | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: | | |
npm install -g @storybook/cli | |
npm install | |
npm run build | |
npm run release |