Skip to content

fix(build): add publishConfig key to fix npm deployment #2

fix(build): add publishConfig key to fix npm deployment

fix(build): add publishConfig key to fix npm deployment #2

Workflow file for this run

name: Release
on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ci:
name: CI
runs-on: ubuntu-latest
steps:
- name: Check out project
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build schemas
run: npm run build
- name: Verify build output
run: |
echo "Checking component count..."
find components -name "schema.json" | wc -l
echo "Checking main index..."
ls -la index.js
deploy:
name: Deploy release
runs-on: ubuntu-latest
needs: [ci]
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
steps:
- name: Check out project
uses: actions/checkout@v4
with:
# Fetch all history for all branches and tags, which is needed for the release script
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build schemas
run: npm run build
- name: Deploy to NPM and Github
run: npm run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}