Mirror: A Node.js fetch shim using built-in Request, Response, and Headers (but without native fetch)
1name: Release 2on: 3 push: 4 branches: 5 - main 6 7jobs: 8 release: 9 name: Release 10 runs-on: ubuntu-20.04 11 timeout-minutes: 20 12 permissions: 13 contents: write 14 id-token: write 15 issues: write 16 repository-projects: write 17 deployments: write 18 packages: write 19 pull-requests: write 20 steps: 21 - name: Checkout Repo 22 uses: actions/checkout@v4 23 with: 24 fetch-depth: 0 25 26 - name: Setup pnpm 27 uses: pnpm/action-setup@v3 28 with: 29 version: 9 30 run_install: false 31 32 - name: Setup Node 33 uses: actions/setup-node@v4 34 with: 35 node-version: 22 36 cache: 'pnpm' 37 38 - name: Install Dependencies 39 run: pnpm install --frozen-lockfile --prefer-offline 40 41 - name: PR or Publish 42 id: changesets 43 uses: changesets/action@v1.4.5 44 with: 45 version: pnpm changeset:version 46 publish: pnpm changeset:publish 47 env: 48 NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 49 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 50 51 - name: Publish Prerelease 52 if: steps.changesets.outputs.published != 'true' 53 env: 54 NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 55 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 56 run: | 57 npm config set "//registry.npmjs.org/:_authToken" "$NPM_TOKEN" 58 git reset --hard origin/main 59 pnpm changeset version --no-git-tag --snapshot canary 60 pnpm changeset publish --no-git-tag --snapshot canary --tag canary