Skip to content

Commit

Permalink
fix: update the release script to use workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
arun3528 committed Jul 31, 2023
1 parent e6090c6 commit de192c6
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 51 deletions.
52 changes: 1 addition & 51 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,42 +67,8 @@ jobs:
- dist
- docs/bundle-analysis-*

release:
executor: node-fermium-executor
steps:
- attach_workspace:
at: .
- run:
name: Release
command: npm run release

storybook:
executor: node-fermium-executor
steps:
- attach_workspace:
at: .
- add_ssh_keys:
fingerprints:
- $RW_FINGERPRINT
- checkout
- run:
name: Build Storybook
command: |
rm -rf docs/storybook
npm run storybook:build
- run:
name: Push Storybook updates to Github
command: |
# Check if there's anything to commit
if [ -n "$(git status --porcelain)" ]; then
git pull
git add docs/storybook
git commit -m "docs: build Storybook [skip ci]"
git push origin master
fi
workflows:
test_and_release:
test_and_storybook:
jobs:
- install
- lint:
Expand All @@ -124,19 +90,3 @@ workflows:
filters:
branches:
only: master
- release:
context:
- webex-embed
requires:
- build
filters:
branches:
only: master
- storybook:
context:
- webex-embed
requires:
- release
filters:
branches:
only: master
41 changes: 41 additions & 0 deletions .github/workflows/npm-storybook-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: components

on:
push:
branches:
- master

jobs:
semantic-release:
name: semantic-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm install
- run: npm run build
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- run:
name: Build Storybook
command: |
rm -rf docs/storybook
npm run storybook:build
- run:
name: Push Storybook updates to Github
command: |
# Check if there's anything to commit
if [ -n "$(git status --porcelain)" ]; then
git pull
git add docs/storybook
git commit -m "docs: build Storybook [skip ci]"
git push origin master
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit de192c6

Please sign in to comment.