build(@unimolecule/canon,@unimolecule/oh-my-fetch,@unimolecule/utils)… #12
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: Release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.SELF_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| GITHUB_BRANCH: ${{ github.ref_name }} | |
| on: | |
| push: | |
| branches: | |
| - main | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| cache: pnpm | |
| - name: Install Dependencies | |
| run: pnpm install --no-frozen-lockfile | |
| - name: Build Packages | |
| run: pnpm build | |
| - name: Fetch Github User Email | |
| run: git config --global user.email $(git log -n 1 --pretty=format:%ae) | |
| - name: Fetch Github User Name | |
| run: git config --global user.name $(git log -n 1 --pretty=format:%an) | |
| - name: Configure npm token | |
| run: pnpm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN | |
| - name: Create release PR or publish | |
| uses: changesets/action@v1 | |
| env: | |
| NPM_CONFIG_FORCE: "true" | |
| with: | |
| version: pnpm changeset:version | |
| publish: pnpm changeset:publish | |
| commit: "docs: 📝 changesets/action version packages" | |
| createGithubReleases: true |