Skip to content

Update semantic-release.yml #66

Update semantic-release.yml

Update semantic-release.yml #66

name: Release
on:
workflow_dispatch:
push:
branches: [main]
permissions:
actions: write
contents: write
id-token: write
packages: write
pages: write
env:
GH_PACKAGES_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
jobs:
release:
name: Release Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Set up .npmrc
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
- name: install dependencies
run: npm install
- name: test
run: npm test
- name: build
run: npm run build
- name: Release to Github Packages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: npm run semantic-release
deploy:
name: Deploy Doc Site
runs-on: ubuntu-latest
steps:
- name: Set up .npmrc
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
- id: build-publish
uses: bitovi/github-actions-storybook-to-github-pages@v1.0.2
with:
path: storybook-static
build_command: export NPM_TOKEN=${NPM_TOKEN} npm run build-storybook-docs