Skip to content

chore: fix release pipeline #29

chore: fix release pipeline

chore: fix release pipeline #29

Workflow file for this run

name: CI/CD Workflow
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
entire_workflow:
name: CI/CD Process
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js 20
uses: actions/setup-node@v3
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- name: Run build
run: npm run build
- name: Run prettier check
run: npm run format:check
- name: Release
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
- name: Initialise the NPM config
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: npm config set //registry.npmjs.com/:_authToken=$NPM_AUTH_TOKEN
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: NPM Release
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: npm run release
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}