Setup trusted publishing to NPM (#92) #89
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: Main Flow | |
| on: | |
| push: | |
| branches: [main] | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| permissions: {} | |
| jobs: | |
| build: | |
| if: github.repository_owner == 'Effect-Ts' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| uses: ./.github/actions/setup | |
| with: | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Upgrade npm for OIDC support | |
| run: npm install -g npm@latest | |
| - name: Type check | |
| run: tsc --noEmit | |
| - run: pnpm build | |
| - name: Create Release Pull Request or Publish | |
| id: changesets | |
| uses: changesets/action@v1 | |
| with: | |
| version: pnpm run version | |
| publish: pnpm exec changeset publish | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |