Skip to content

fix: downgrade semantic-release to 20.1.1. #51

fix: downgrade semantic-release to 20.1.1.

fix: downgrade semantic-release to 20.1.1. #51

Workflow file for this run

name: Test and Deploy Package
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: write # for publishing releases
issues: write # for commenting on released issues
pull-requests: write # for commenting on released pull requests
pages: write # for deploying to GitHub Pages
id-token: write # for deploying to GitHub Pages
# Allow only one concurrent deployment
concurrency:
group: pages-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Lint
run: yarn lint
- name: Build
run: yarn build
- name: Test
run: yarn test:unit
release:
needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build package
run: yarn build
- name: Release package
uses: cycjimmy/semantic-release-action@v4
with:
semantic_version: 19
extra_plugins: |
@semantic-release/git@10.0.1
@semantic-release/github@10.1.0
@semantic-release/npm@12.0.1
branches: |
['main']
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_NPM_TOKEN }}
deploy-storybook:
needs: release
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build Storybook
run: yarn build:storybook
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: storybook-static
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4