name: Release on: push: branches: [main] concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: false # Prevent newer push from interrupting active release permissions: {} jobs: release: if: github.repository_owner == 'Effect-Ts' name: Release runs-on: ubuntu-latest timeout-minutes: 30 permissions: contents: write pull-requests: write id-token: write steps: - uses: actions/checkout@v6 with: # This is required to ensure the `GITHUB_TOKEN` we provide below is # **always** used when pushing updates to the changesets release branch. # Otherwise the default token will be used, and actions on that versioned # release branch will not be triggered. persist-credentials: false - name: Install dependencies uses: ./.github/actions/setup - name: Upgrade npm for OIDC support run: npm install -g npm@11 - name: Set strip internals config run: | sed -i 's/"stripInternal": false/"stripInternal": true/' tsconfig.base.json - name: Create Release Pull Request or Publish uses: changesets/action@v1 with: version: pnpm changeset-version publish: pnpm changeset-publish env: # Use a personal access token instead of the one that GitHub generates # automatically to ensure workflows get triggered on the changesets # release branch. GITHUB_TOKEN: ${{ secrets.CHANGESET_GITHUB_TOKEN }}