This repository has been archived by the owner on Jun 18, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
117 lines (99 loc) · 2.97 KB
/
version.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Version
on:
workflow_dispatch:
branches: [main]
concurrency: ${{ github.workflow }}-${{ github.ref }}
env:
CI: true
PNPM_CACHE_FOLDER: .pnpm-store
jobs:
version:
name: Version
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Install pnpm
uses: pnpm/action-setup@v2
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build
- name: Test
run: pnpm test
- name: Coverage for @reshoot/core
uses: codecov/codecov-action@v2
with:
directory: ./packages/core/coverage
flags: core
fail_ci_if_error: true
verbose: true
- name: Coverage for @reshoot/loader
uses: codecov/codecov-action@v2
with:
directory: ./packages/loader/coverage
flags: loader
fail_ci_if_error: true
verbose: true
- name: Coverage for @reshoot/macro
uses: codecov/codecov-action@v2
with:
directory: ./packages/macro/coverage
flags: macro
fail_ci_if_error: true
verbose: true
- name: Coverage for @reshoot/react
uses: codecov/codecov-action@v2
with:
directory: ./packages/react/coverage
flags: react
fail_ci_if_error: true
verbose: true
- name: Coverage for @reshoot/remark-mdx-image
uses: codecov/codecov-action@v2
with:
directory: ./packages/remark-mdx-image/coverage
flags: remark-mdx-image
fail_ci_if_error: true
verbose: true
- name: Coverage for @reshoot/types
uses: codecov/codecov-action@v2
with:
directory: ./packages/types/coverage
flags: types
fail_ci_if_error: true
verbose: true
- name: Create Release Pull Request
uses: changesets/action@v1
with:
version: pnpm run version
commit: "chore: update versions"
title: "chore: update versions"
publish: pnpm run publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}