name: Publish on: workflow_dispatch: jobs: publish: name: Publish runs-on: ubuntu-latest permissions: contents: read id-token: write # Required for OIDC trusted publishing timeout-minutes: 15 steps: - name: Checkout repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 filter: tree:0 - uses: ./.github/actions/setup-node - name: Build publishable packages run: pnpm nx run-many -p="tag:npm:public" -t=build - name: "Verify packed manifests have no catalog:/workspace: specifiers" run: node tools/guards/check-tarball-specifiers.mjs shell: bash - name: Print Environment Info run: pnpm nx report shell: bash - name: Determine npm tag id: npm-tag run: | BRANCH_NAME=${GITHUB_REF#refs/heads/} if [ "$BRANCH_NAME" = "main" ]; then echo "tag=latest" >> $GITHUB_OUTPUT else echo "tag=$BRANCH_NAME" >> $GITHUB_OUTPUT fi - name: Publish packages run: pnpm nx release publish --excludeTaskDependencies --tag=${{ steps.npm-tag.outputs.tag }} shell: bash