chore(chimp-core): bump to 0.4.6 #98
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: Release Monorepo Packages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - '@chimp-stack/*@*' # Triggers only on scoped version tags | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| name: Build and Publish ${{ matrix.package }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| package: | |
| - chimp-core | |
| - git-chimp | |
| - doc-chimp | |
| - release-chimp | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Required for tag detection | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| registry-url: 'https://registry.npmjs.org/' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build package and dependencies with Turbo | |
| run: npx turbo run build --filter=${{ matrix.package }} --concurrency=1 | |
| - name: Publish package if new | |
| run: | | |
| PACKAGE_NAME=$(node -p "require('./packages/${{ matrix.package }}/package.json').name") | |
| CURRENT_VERSION=$(node -p "require('./packages/${{ matrix.package }}/package.json').version") | |
| PUBLISHED_VERSION=$(npm view $PACKAGE_NAME version || echo "0.0.0") | |
| echo "📦 Package: $PACKAGE_NAME" | |
| echo "🔖 Current Version: $CURRENT_VERSION" | |
| echo "📬 Published Version: $PUBLISHED_VERSION" | |
| if [ "$CURRENT_VERSION" = "$PUBLISHED_VERSION" ]; then | |
| echo "⏩ Skipping — already published." | |
| exit 0 | |
| fi | |
| npm pack | |
| tar -tf *.tgz | |
| # echo "🚀 Publishing $PACKAGE_NAME@$CURRENT_VERSION..." | |
| # npm publish --workspace $PACKAGE_NAME --access public | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |