name: Deployment concurrency: production on: push: branches: - main # To use Turborepo Remote Caching, set the following environment variables. # env: # TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} # TURBO_TEAM: ${{ secrets.TURBO_TEAM }} jobs: release: runs-on: ubuntu-latest environment: production permissions: contents: write pull-requests: write id-token: write steps: - uses: googleapis/release-please-action@v4 id: release with: config-file: .github/release-please/release-please-config.json manifest-file: .github/release-please/.release-please-manifest.json - uses: actions/checkout@v5 # these if statements ensure that a publication only occurs when # a new release is created: if: ${{ steps.release.outputs.releases_created == 'true' }} with: fetch-depth: 0 # Fetch all history for all tags and branches - name: Setup pnpm if: ${{ steps.release.outputs.releases_created == 'true' }} uses: pnpm/action-setup@v4 - uses: actions/setup-node@v5 if: ${{ steps.release.outputs.releases_created == 'true' }} with: node-version-file: '.nvmrc' registry-url: 'https://registry.npmjs.org' - name: Install if: ${{ steps.release.outputs.releases_created == 'true' }} run: pnpm i --frozen-lockfile - name: Cache turbo build setup if: ${{ steps.release.outputs.releases_created == 'true' }} uses: actions/cache@v5 with: path: .turbo key: ${{ runner.os }}-turbo-${{ github.sha }} restore-keys: | ${{ runner.os }}-turbo- - name: Clean if: ${{ steps.release.outputs.releases_created == 'true' }} run: pnpm clean - name: Build if: ${{ steps.release.outputs.releases_created == 'true' }} run: pnpm build:packages - name: Publish if: ${{ steps.release.outputs.releases_created == 'true' }} run: pnpm -r publish --filter "./packages/*" publish --access public --provenance --tag next --no-git-checks