diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d1f0bd9a9892..ee7b39bcd306 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,3 +58,34 @@ jobs: name: tag_name, body: changelog, }) + + publish: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} # tag name + - uses: pnpm/action-setup@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: pnpm + + - name: bump version to ${{ github.ref }} + run: pnpx replace-in-files-cli --string="0.191.0" --replacement="${{ github.ref }}" "**/package.json" + + - name: pnpm instal + run: pnpm install --ignore-scripts + - run: pnpm -r build + - run: pnpm -r dts + + - name: Creating .npmrc + run: | + cat << EOF > "$HOME/.npmrc" + //registry.npmjs.org/:_authToken=$NPM_TOKEN + EOF + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + - run: pnpm -r publish --access public --no-git-checks