-
Notifications
You must be signed in to change notification settings - Fork 357
51 lines (50 loc) · 1.36 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Changesets
on:
push:
branches:
- master
env:
CI: true
PNPM_CACHE_FOLDER: .pnpm-store
jobs:
version:
timeout-minutes: 15
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [latest]
steps:
- name: checkout code repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: install pnpm
run: npm i pnpm@latest -g
- name: Setup npmrc
run: |
cat << EOF > "$HOME/.npmrc"
email=${NPM_EMAIL}
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_EMAIL: ${{ secrets.NPM_EMAIL }}
- name: setup pnpm config
run: pnpm config set store-dir $PNPM_CACHE_FOLDER
- name: install dependencies
run: pnpm install
- name: create publish versions
uses: changesets/action@v1
with:
version: pnpm ci:version
commit: 'chore: release versions'
title: 'chore: release versions'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: publish to npm
run: pnpm run release