Add support for next config basePath
#40
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: Pipeline | |
| on: | |
| push: | |
| branches: [main] | |
| paths: ["package.json", "src/**", "tests/**"] | |
| pull_request: | |
| branches: [main] | |
| types: [opened, synchronize, reopened] | |
| paths: ["package.json", "src/**", "tests/**"] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| check: | |
| name: Type Checking | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: ./.github/actions/node | |
| - name: Run the type checker | |
| run: pnpm check | |
| lint: | |
| name: Linting | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: ./.github/actions/node | |
| - name: Run the linter | |
| run: pnpm lint | |
| build: | |
| name: Building | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: ./.github/actions/node | |
| - name: Build the package | |
| run: pnpm build | |
| test: | |
| name: Testing | |
| needs: [build] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: ./.github/actions/node | |
| - name: Install playwright browsers | |
| run: pnpm playwright install --with-deps | |
| - name: Run tests | |
| run: pnpm test | |
| - name: Upload test outputs | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-outputs | |
| path: | | |
| tests/.report/ | |
| tests/.results/ | |
| include-hidden-files: true | |
| retention-days: 7 | |
| process: | |
| name: Processing Changesets | |
| needs: [test] | |
| runs-on: ubuntu-latest | |
| outputs: | |
| published: ${{ steps.changesets.outputs.published }} | |
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: ./.github/actions/node | |
| - name: Process changesets | |
| id: changesets | |
| uses: changesets/action@v1 | |
| with: | |
| version: pnpm run release:version | |
| publish: pnpm run release:publish | |
| title: "Pending Releases" | |
| commit: "Update changelog and release" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_PULL_REQUEST_TOKEN }} | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - run: | | |
| echo "published=${{ steps.changesets.outputs.published }}" >> $GITHUB_OUTPUT | |
| deprecate: | |
| name: Deprecating Beta Versions | |
| needs: [process] | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.process.outputs.published == 'true' }} | |
| steps: | |
| - name: Deprecate beta versions | |
| run: | | |
| package=$(curl -s "https://registry.npmjs.org/next-ws") | |
| versions=$(echo "$package" | jq -r '.versions | to_entries | map(select(.value.deprecated | not)) | map(.key)') | |
| beta_versions=$(echo "$versions" | jq -r '.[] | select(test("beta"))') | |
| for version in $beta_versions; do | |
| sleep 5 | |
| echo "Deprecating next-ws@$version" | |
| npm deprecate next-ws@$version "This beta version has been merged into the latest release. Please upgrade to the latest version." | |
| done | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| snapshot: | |
| name: Releasing Snapshot | |
| needs: [process] | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.process.outputs.published == 'false' }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: ./.github/actions/node | |
| - name: Publish snapshot version | |
| run: | | |
| pnpm run release:snapshot:version | |
| pnpm run release:snapshot:publish | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| continue-on-error: true |