Skip to content

chore: Update package.json version to 1.0.193 and Switch component st… #224

chore: Update package.json version to 1.0.193 and Switch component st…

chore: Update package.json version to 1.0.193 and Switch component st… #224

Workflow file for this run

name: Continuous Integration and Deployment
on:
push:
tags:
- "v*"
permissions:
contents: write
id-token: write
pages: write
checks: write
deployments: write
actions: write
packages: write
statuses: write
security-events: write
repository-projects: write
pull-requests: write
issues: write
discussions: write
jobs:
lint-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install NodeJS
uses: actions/setup-node@v3
with:
node-version: "20"
cache: "pnpm"
- name: Install NodeJS dependencies
run: pnpm install
- name: Run linting
run: pnpm lint:ci
- name: Run type check
run: pnpm types:check
publish-storybook:
needs: lint-and-test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install NodeJS
uses: actions/setup-node@v3
with:
node-version: "20"
cache: "pnpm"
- name: Install NodeJS dependencies
run: pnpm install
- name: Build Storybook
env:
NODE_OPTIONS: "--max_old_space_size=16384"
run: pnpm run build-storybook
- name: Create CNAME record file
run: echo "yail.programmer-network" > ./storybook-static/CNAME
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: "./storybook-static"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
publish-npm:
needs: [lint-and-test, publish-storybook]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install NodeJS
uses: actions/setup-node@v3
with:
node-version: "20"
registry-url: "https://registry.npmjs.org"
scope: "@programmer_network"
cache: "pnpm"
- name: Install NodeJS dependencies
run: pnpm install
- name: Build the code
run: pnpm build
- name: Set up Git identity
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
- name: Publish to npm
run: npm publish --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}