Skip to content

Merge pull request #7 from xiaohuohumax/changeset-release/master #10

Merge pull request #7 from xiaohuohumax/changeset-release/master

Merge pull request #7 from xiaohuohumax/changeset-release/master #10

Workflow file for this run

name: Publish Package
on:
push:
branches:
- master
jobs:
publish:
runs-on: ubuntu-latest
environment: Release
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Creating .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Install pnpm
uses: pnpm/action-setup@v3
- name: Set node version to 20
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
cache: pnpm
- name: Install
run: pnpm install --frozen-lockfile
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}