-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.28 KB
/
release.yml
File metadata and controls
52 lines (44 loc) · 1.28 KB
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
name: Release CI
on:
push:
branches:
- release
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- name: Cache
id: cache-dependencies
uses: actions/cache@v4
with:
path: |
**/node_modules
key: ${{runner.OS}}-${{hashFiles('**/pnpm-lock.yaml')}}
- name: Install pnpm
run: npm install -g pnpm
- name: Installing Dependencies
if: steps.cache-dependencies.outputs.cache-hit != 'true'
run: pnpm install
- name: Running Test
run: pnpm run test
- name: Running Build
run: pnpm run build
- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
version: pnpm run version
publish: pnpm run publish
commit: 'chore(release): changesets versioning & publish'
title: 'Changesets: versioning & publish'
env:
GITHUB_TOKEN: ${{ secrets.GHP_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}