-
Notifications
You must be signed in to change notification settings - Fork 3
68 lines (57 loc) · 1.6 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# This workflow will release the package.
name: 🚀 Release
on:
push:
branches:
- main
workflow_dispatch:
concurrency: ${{ github.workflow }}-${{ github.ref }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
jobs:
release:
name: 📦 Release
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [lts/*]
steps:
- name: ⬇️ Checkout
id: checkout
uses: actions/[email protected]
with:
token: ${{ env.GH_TOKEN }}
fetch-depth: 0
- name: 🟢 Setup node
id: setup-node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: 🥡 Setup pnpm
id: setup-pnpm
uses: pnpm/[email protected]
with:
version: latest
run_install: false
- name: 🎈 Get pnpm store directory
id: get-pnpm-cache-dir
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- name: 🧩 Install Dependencies
id: install-dependencies
run: pnpm install
- name: 🏗️ Build
id: build
run: pnpm build
- name: 📣 Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
title: 'chore(release): version packages'
publish: pnpm publish:packages
version: pnpm version:packages
commit: 'chore(release): version packages 🦋'
env:
GITHUB_TOKEN: ${{ env.GH_TOKEN }}
NPM_TOKEN: ${{ env.NPM_TOKEN }}