chore: add pipeline badge to root repo #27
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: Sanity Check & Publish | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| # ── Tests ────────────────────────────────────────────────────────────────── | |
| test-bundle-budget: | |
| name: Test astro-bundle-budget (Node ${{ matrix.node }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node: ["18", "20", "22"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: npm | |
| - run: npm ci | |
| - run: npm test --workspace=packages/astro-bundle-budget | |
| test-env-inspector: | |
| name: Test astro-env-inspector (Node ${{ matrix.node }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node: ["18", "20", "22"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: npm | |
| - run: npm ci | |
| - run: npm test --workspace=packages/astro-env-inspector | |
| test-toolbar-routes: | |
| name: Test astro-toolbar-routes (Node ${{ matrix.node }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node: ["18", "20", "22"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: npm | |
| - run: npm ci | |
| - run: npm test --workspace=packages/astro-toolbar-routes | |
| test-i18n-toolkit: | |
| name: Test astro-i18n-toolkit (Node ${{ matrix.node }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node: ["18", "20", "22"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: npm | |
| - run: npm ci | |
| - run: npm test --workspace=packages/astro-i18n-toolkit | |
| # ── Publish ──────────────────────────────────────────────────────────────── | |
| # Every publish job waits for ALL test suites. | |
| # Triggered by commit message prefix: release(<package-name>): vX.X.X | |
| publish-bundle-budget: | |
| name: Publish astro-bundle-budget | |
| needs: | |
| [ | |
| test-bundle-budget, | |
| test-env-inspector, | |
| test-toolbar-routes, | |
| test-i18n-toolkit, | |
| ] | |
| runs-on: ubuntu-latest | |
| if: | | |
| github.ref == 'refs/heads/main' && | |
| startsWith(github.event.head_commit.message, 'release(astro-bundle-budget):') | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| registry-url: "https://registry.npmjs.org" | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run build --workspace=packages/astro-bundle-budget | |
| - run: npm publish --access public | |
| working-directory: packages/astro-bundle-budget | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| publish-env-inspector: | |
| name: Publish astro-env-inspector | |
| needs: | |
| [ | |
| test-bundle-budget, | |
| test-env-inspector, | |
| test-toolbar-routes, | |
| test-i18n-toolkit, | |
| ] | |
| runs-on: ubuntu-latest | |
| if: | | |
| github.ref == 'refs/heads/main' && | |
| startsWith(github.event.head_commit.message, 'release(astro-env-inspector):') | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| registry-url: "https://registry.npmjs.org" | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run build --workspace=packages/astro-env-inspector | |
| - run: npm publish --access public | |
| working-directory: packages/astro-env-inspector | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| publish-toolbar-routes: | |
| name: Publish astro-toolbar-routes | |
| needs: | |
| [ | |
| test-bundle-budget, | |
| test-env-inspector, | |
| test-toolbar-routes, | |
| test-i18n-toolkit, | |
| ] | |
| runs-on: ubuntu-latest | |
| if: | | |
| github.ref == 'refs/heads/main' && | |
| startsWith(github.event.head_commit.message, 'release(astro-toolbar-routes):') | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| registry-url: "https://registry.npmjs.org" | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run build --workspace=packages/astro-toolbar-routes | |
| - run: npm publish --access public | |
| working-directory: packages/astro-toolbar-routes | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| publish-i18n-toolkit: | |
| name: Publish astro-i18n-toolkit | |
| needs: | |
| [ | |
| test-bundle-budget, | |
| test-env-inspector, | |
| test-toolbar-routes, | |
| test-i18n-toolkit, | |
| ] | |
| runs-on: ubuntu-latest | |
| if: | | |
| github.ref == 'refs/heads/main' && | |
| startsWith(github.event.head_commit.message, 'release(astro-i18n-toolkit):') | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| registry-url: "https://registry.npmjs.org" | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run build --workspace=packages/astro-i18n-toolkit | |
| - run: npm publish --access public | |
| working-directory: packages/astro-i18n-toolkit | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |