-
Notifications
You must be signed in to change notification settings - Fork 35
204 lines (194 loc) · 8.46 KB
/
publish.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
name: 01 - Publish
env:
access: public
registry: https://registry.npmjs.org
token: ${{ secrets.NPMJS_GRANULAR_TOKEN }}
prefix: v1
on:
workflow_dispatch:
inputs:
tag:
type: choice
description: Which NPM tag should be assigned?
options:
- next
- latest
jobs:
publish:
if: github.repository == 'public-ui/kolibri'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
# https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: '${{env.registry}}'
scope: '@public-ui'
- name: Install pnpm
uses: pnpm/action-setup@v3
id: pnpm-install
with:
version: 8
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store
restore-keys: |
${{ runner.os }}-pnpm-store
- name: Install
run: pnpm i --no-frozen-lockfile --no-verify-store-integrity
- name: Build
run: pnpm -r build
- name: Build and publish schema
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/schema
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish components
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/components
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish adapter angular v11
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/adapters/angular/v11
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish adapter angular v12
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/adapters/angular/v12
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish adapter angular v13
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/adapters/angular/v13
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish adapter angular v14
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/adapters/angular/v14
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish adapter angular v15
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/adapters/angular/v15
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish adapter angular v16
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/adapters/angular/v16
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish adapter angular v17
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/adapters/angular/v17
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish adapter react
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/adapters/react
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish adapter react-standalone
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/adapters/react-standalone
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish adapter solid
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/adapters/solid
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish adapter vue
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/adapters/vue
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish adapter preact
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/adapters/preact
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish adapter hydrate
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/adapters/hydrate
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish create-kolibri
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/create-kolibri
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish tools kolibri-cli
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/tools/kolibri-cli
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish theme default
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/themes/default
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish themes
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/themes
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish sample react
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/samples/react
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish tools visual-tests
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/tools/visual-tests
env:
NODE_AUTH_TOKEN: ${{env.token}}
# deprecated packages
- name: Build and publish core
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/core
env:
NODE_AUTH_TOKEN: ${{env.token}}
# packages a obsolete with next major release
- name: Build and publish create-kolibri
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/create-kolibri
env:
NODE_AUTH_TOKEN: ${{env.token}}
publish-page:
needs: publish
uses: public-ui/kolibri/.github/workflows/publish-page.yml@release/1.7