chore: release main (#25) #24
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-please | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| id-token: write # for npm provenance attestations | |
| concurrency: | |
| group: release-please-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| release-please: | |
| name: Release Please | |
| runs-on: ubuntu-latest | |
| outputs: | |
| releases_created: ${{ steps.release.outputs.releases_created }} | |
| starlight_theme_released: ${{ steps.release.outputs['packages/starlight-theme--release_created'] }} | |
| create_docs_released: ${{ steps.release.outputs['packages/create-docs--release_created'] }} | |
| steps: | |
| - name: Run release-please | |
| id: release | |
| uses: googleapis/release-please-action@v4 | |
| with: | |
| config-file: release-please-config.json | |
| manifest-file: .release-please-manifest.json | |
| publish-starlight-theme: | |
| name: Publish @abstractdata/starlight-theme to npm | |
| needs: release-please | |
| if: ${{ needs.release-please.outputs.starlight_theme_released == 'true' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| # Pinned to match `packageManager` in root package.json | |
| # (1.1.45 = minimum version with text-lockfile support). | |
| bun-version: 1.1.45 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Typecheck (via playground app — provides Astro runtime context) | |
| run: bun --filter @abstract-data/playground typecheck | |
| - name: Publish to npm with provenance | |
| working-directory: packages/starlight-theme | |
| run: npm publish --provenance --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| publish-create-docs: | |
| name: Publish @abstractdata/create-docs to npm | |
| needs: release-please | |
| if: ${{ needs.release-please.outputs.create_docs_released == 'true' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| # Pinned to match `packageManager` in root package.json | |
| # (1.1.45 = minimum version with text-lockfile support). | |
| bun-version: 1.1.45 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| registry-url: 'https://registry.npmjs.org' | |
| - run: bun install --frozen-lockfile | |
| - name: Publish (prepack copies the template dir) | |
| working-directory: packages/create-docs | |
| run: npm publish --provenance --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |