name: Release on: push: branches: - main permissions: contents: write id-token: write pull-requests: write concurrency: group: release-${{ github.ref }} cancel-in-progress: false jobs: verify: name: Verify uses: ./.github/workflows/verify.yml test: name: Tests needs: verify uses: ./.github/workflows/tests.yml integration-tests: name: Integration Tests needs: verify uses: ./.github/workflows/integration-tests.yml secrets: inherit changesets: name: Changesets runs-on: ubuntu-latest outputs: has_changesets: ${{ steps.release.outputs.hasChangesets }} published: ${{ steps.release.outputs.published }} needs: - verify - test # Temporarily do not block changesets while we solve the integration test runner issue. # - integration-tests steps: - name: Checkout Repository uses: actions/checkout@v7 - name: Set Up Repository uses: ./.github/actions/setup - name: Create Or Update Release PR id: release uses: changesets/action@a45c4d594aa4e2c509dc14a9f2b3b67ba3780d0d # v1 with: version: pnpm version:bump publish: pnpm release title: '[Release] Candidate' commit: 'chore: bumps package versions' createGithubReleases: false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} canary: name: Publish Canary runs-on: ubuntu-latest needs: - changesets if: "${{ needs.changesets.outputs.has_changesets == 'true' && needs.changesets.outputs.published != 'true' }}" steps: - name: Checkout Repository uses: actions/checkout@v7 - name: Set Up Repository uses: ./.github/actions/setup - name: Disable Prerelease Mode For Canary run: if test -f .changeset/pre.json; then mv .changeset/pre.json .changeset/pre.json.disabled; fi - name: Version Packages For Canary run: pnpm version:canary - name: Build run: pnpm build - name: Publish Canary Packages run: pnpm release:canary notify-e2e-defi: name: Notify e2e-defi runs-on: ubuntu-latest needs: canary steps: - id: app-token uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 with: # GITHUB_TOKEN can't dispatch cross-repo; polymarket-ci-bot is installed on e2e-defi. # CI_APP_ID + CI_APP_PRIVATE_KEY need to be added as secrets on this repo (the same # pair e2e-defi already carries), and the app needs Contents: write for the dispatch. client-id: ${{ secrets.CI_APP_ID }} private-key: ${{ secrets.CI_APP_PRIVATE_KEY }} owner: Polymarket repositories: e2e-defi - name: Dispatch sdk-canary-published env: GH_TOKEN: ${{ steps.app-token.outputs.token }} run: | gh api repos/Polymarket/e2e-defi/dispatches \ -f event_type=sdk-canary-published \ -f 'client_payload[source]=ts-sdk release'