fix: safe uninstall + nuclear option (v1.0.1) #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish to npm | |
| on: | |
| push: | |
| tags: | |
| - 'v*' # Triggers on version tags like v1.0.0, v1.1.0, etc. | |
| workflow_dispatch: # Allows manual trigger from GitHub UI | |
| jobs: | |
| validate: | |
| name: Pre-publish Validation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Build skills | |
| run: ./scripts/build-skills.sh | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Check version not already published | |
| working-directory: ./cli-installer | |
| run: | | |
| CURRENT=$(node -p "require('./package.json').version") | |
| PUBLISHED=$(npm view design-superskills version 2>/dev/null || echo "0.0.0") | |
| echo "Current version: $CURRENT" | |
| echo "Published version: $PUBLISHED" | |
| if [ "$CURRENT" = "$PUBLISHED" ]; then | |
| echo "❌ Version $CURRENT is already published on npm!" | |
| echo "Please bump the version using: ./scripts/bump-version.sh [patch|minor|major]" | |
| exit 1 | |
| fi | |
| echo "✅ Version $CURRENT is new (ready to publish)" | |
| publish: | |
| name: Publish to npm | |
| needs: validate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Build skills | |
| run: ./scripts/build-skills.sh | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install dependencies | |
| working-directory: ./cli-installer | |
| run: npm ci | |
| - name: Run tests | |
| working-directory: ./cli-installer | |
| run: npm test | |
| - name: Publish to npm | |
| working-directory: ./cli-installer | |
| run: npm publish | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |