update release workflow for pnpm
This commit is contained in:
39
.github/workflows/release.yml
vendored
39
.github/workflows/release.yml
vendored
@@ -1,39 +1,44 @@
|
|||||||
# https://github.com/changesets/action#with-publishing
|
# https://pnpm.io/using-changesets
|
||||||
name: Release
|
name: release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
concurrency:
|
env:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
CI: true
|
||||||
cancel-in-progress: true
|
PNPM_CACHE_FOLDER: .pnpm-store
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
version:
|
||||||
name: Release
|
timeout-minutes: 15
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repo
|
- name: checkout code repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: setup node.js
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 16.x
|
node-version: 16
|
||||||
|
|
||||||
- name: Install pnpm
|
- name: install pnpm
|
||||||
run: npm install -g pnpm
|
run: npm install pnpm -g
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: setup .npmrc
|
||||||
run: pnpm install --frozen-lockfile
|
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
|
||||||
|
|
||||||
- name: Create Release Pull Request or Publish to npm
|
- name: setup pnpm config
|
||||||
id: changesets
|
run: pnpm config set store-dir $PNPM_CACHE_FOLDER
|
||||||
|
|
||||||
|
- name: install dependencies
|
||||||
|
run: pnpm install
|
||||||
|
|
||||||
|
- name: create and publish versions
|
||||||
uses: changesets/action@v1
|
uses: changesets/action@v1
|
||||||
with:
|
with:
|
||||||
publish: pnpm run release
|
publish: pnpm release
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|||||||
Reference in New Issue
Block a user