Skip to content

debug: more tweaking #37

debug: more tweaking

debug: more tweaking #37

Workflow file for this run

name: CD
on:
push:
branches: [main]
permissions:
contents: write
id-token: write
jobs:
build-test-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Install deps
run: npm ci
- name: Build
run: npm run build
- name: Run checks (linting, type-checking, formatting)
run: npm run check
- name: Ensure repo is clean after checks
run: git diff --exit-code
- name: Run tests
run: npm run test
- name: Configure git user
run: |
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git config --global user.name "${{ github.actor }}"
- name: Bump version locally
run: npm version patch -m "chore(release)"
- name: Debug npm config
run: |
echo "=== .npmrc contents ==="
cat /home/runner/work/_temp/.npmrc || echo "No .npmrc found"
echo "=== npm config list ==="
npm config list
echo "=== Environment variables ==="
env | grep -E "(NPM|NODE)" || echo "No NPM/NODE env vars found"
- name: Publish to npm
run: npm publish
- name: Push commit and tag (only if publish succeeded)
if: success()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: git push origin HEAD:main --follow-tags