Add changeset #1044
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: Accented | |
| on: | |
| push: | |
| branches-ignore: | |
| - stage | |
| jobs: | |
| build-test-publish: | |
| timeout-minutes: 60 | |
| runs-on: ubuntu-latest | |
| outputs: | |
| publishedPackages: ${{ steps.changesets.outputs.publishedPackages }} | |
| permissions: | |
| id-token: write | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| - name: Build | |
| run: pnpm build | |
| - name: Run unit tests | |
| run: pnpm test:unit | |
| - name: Install Playwright browsers | |
| uses: ./.github/actions/installPlaywright | |
| - name: Run end-to-end tests | |
| run: pnpm test:e2e | |
| - name: Archive end-to-end test results | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: e2e-results | |
| path: packages/devapp/playwright | |
| - name: Create release PR or publish | |
| id: changesets | |
| if: github.ref == 'refs/heads/main' | |
| uses: changesets/action@v1 | |
| with: | |
| version: pnpm changeset-version | |
| publish: pnpm changeset publish | |
| env: | |
| # We're not using the default github token because actions generated by a workflow using a default token | |
| # can't generate other workflows: | |
| # https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/triggering-a-workflow#triggering-a-workflow-from-a-workflow | |
| # Using a personal access token is one of the recommended workarounds. | |
| GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }} | |
| NPM_CONFIG_PROVENANCE: true | |
| - name: Snapshot release | |
| if: startsWith(github.ref, 'refs/heads/snapshot') | |
| run: pnpm changeset version --snapshot && pnpm --filter accented publish --no-git-checks --tag snapshot | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }} | |
| NPM_CONFIG_PROVENANCE: true | |
| update-playground: | |
| timeout-minutes: 10 | |
| runs-on: ubuntu-latest | |
| needs: build-test-publish | |
| if: github.ref == 'refs/heads/main' && contains(needs.build-test-publish.outputs.publishedPackages, '"accented"') | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| - name: Extract version from changesets output | |
| id: version | |
| run: | | |
| # Extract version from publishedPackages JSON | |
| VERSION=$(echo '${{ needs.build-test-publish.outputs.publishedPackages }}' | jq -r '.[] | select(.name == "accented") | .version') | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "Extracted version: $VERSION" | |
| - name: Update playground dependency | |
| run: pnpm -F playground add -D accented@${{ steps.version.outputs.version }} | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v8 | |
| with: | |
| token: ${{ secrets.PERSONAL_GITHUB_TOKEN }} | |
| commit-message: "Bump accented to ${{ steps.version.outputs.version }}" | |
| title: "Bump accented to ${{ steps.version.outputs.version }}" | |
| body: | | |
| Automated update of `accented` dependency in playground to version `${{ steps.version.outputs.version }}`. | |
| This PR was automatically created after publishing accented@${{ steps.version.outputs.version }}. | |
| branch: update-playground-accented-${{ steps.version.outputs.version }} | |
| delete-branch: true |