ci: shrink GHCR matrix and speed Docker builds; flat sorfeszt pints #62
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
| # Versions and publishes @wse/* packages to GitHub Packages using changesets. | |
| # On push: if pending changesets exist, opens/updates a "Version Packages" PR; | |
| # when that PR is merged, publishes the bumped packages. | |
| # | |
| # NOTE: GitHub Packages only accepts npm scopes that match the repository owner. | |
| # Publishing the @wse scope requires a GitHub org named `wse`; until that exists | |
| # the publish step will fail with 404 and only the versioning PR flow is active. | |
| name: Release Packages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - engine-v2 | |
| concurrency: release-${{ github.ref }} | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| packages: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| registry-url: https://npm.pkg.github.com | |
| scope: "@wse" | |
| - name: Install dependencies | |
| run: npm ci --legacy-peer-deps | |
| - name: Run env-safe unit tests | |
| run: npm run test:unit -- --exclude tests/unit/order-and-gls-services.test.ts | |
| - name: Create release PR or publish | |
| uses: changesets/action@v1 | |
| with: | |
| version: npx changeset version | |
| publish: npx changeset publish | |
| title: "Version Packages" | |
| commit: "Version Packages" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |