forked from farm-fe/farm
-
Notifications
You must be signed in to change notification settings - Fork 0
163 lines (143 loc) · 5.41 KB
/
release.yaml
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
name: Publish packages and crates
on:
push:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
call-rust-build:
uses: ./.github/workflows/rust-build.yaml
call-rust-plugin-react-build:
uses: ./.github/workflows/rust-plugin-build.yaml
with:
root: rust-plugins/react
name: plugin-react
call-rust-plugin-sass-build:
uses: ./.github/workflows/rust-plugin-build.yaml
with:
root: rust-plugins/sass
name: plugin-sass
release:
name: Release
needs:
[
call-rust-build,
call-rust-plugin-react-build,
call-rust-plugin-sass-build
]
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
# download rust core artifacts
- uses: actions/download-artifact@v3
id: download-linux-x64-gnu
with:
name: ${{ github.sha }}-linux-x64-gnu
path: ./packages/core/npm/linux-x64-gnu
- name: List Files
run: ls -l ./packages/core/npm/linux-x64-gnu
# copy the binary to core/binding
- name: Copy Core binary
run: cp ./packages/core/npm/linux-x64-gnu/farm.linux-x64-gnu.node ./packages/core/binding
- uses: actions/download-artifact@v3
id: download-darwin-x64
with:
name: ${{ github.sha }}-darwin-x64
path: ./packages/core/npm/darwin-x64
- name: List Files
run: ls -l ./packages/core/npm/darwin-x64
- uses: actions/download-artifact@v3
id: download-win32-x64-msvc
with:
name: ${{ github.sha }}-win32-x64-msvc
path: ./packages/core/npm/win32-x64-msvc
- name: List Files
run: ls -l ./packages/core/npm/win32-x64-msvc
- uses: actions/download-artifact@v3
id: download-darwin-arm64
with:
name: ${{ github.sha }}-darwin-arm64
path: ./packages/core/npm/darwin-arm64
- name: List Files
run: ls -l ./packages/core/npm/darwin-arm64
# download rust plugin react artifacts
- uses: actions/download-artifact@v3
id: download-plugin-react-linux-x64-gnu
with:
name: ${{ github.sha }}-linux-x64-gnu-plugin-react
path: ./rust-plugins/react/npm/linux-x64-gnu
- name: List Files
run: ls -l ./rust-plugins/react/npm/linux-x64-gnu
- uses: actions/download-artifact@v3
id: download-plugin-react-darwin-x64
with:
name: ${{ github.sha }}-darwin-x64-plugin-react
path: ./rust-plugins/react/npm/darwin-x64
- name: List Files
run: ls -l ./rust-plugins/react/npm/darwin-x64
- uses: actions/download-artifact@v3
id: download-plugin-react-win32-x64-msvc
with:
name: ${{ github.sha }}-win32-x64-msvc-plugin-react
path: ./rust-plugins/react/npm/win32-x64-msvc
- name: List Files
run: ls -l ./rust-plugins/react/npm/win32-x64-msvc
- uses: actions/download-artifact@v3
id: download-plugin-react-darwin-arm64
with:
name: ${{ github.sha }}-darwin-arm64-plugin-react
path: ./rust-plugins/react/npm/darwin-arm64
- name: List Files
run: ls -l ./rust-plugins/react/npm/darwin-arm64
# download rust plugin sass artifacts
- uses: actions/download-artifact@v3
id: download-plugin-sass-linux-x64-gnu
with:
name: ${{ github.sha }}-linux-x64-gnu-plugin-sass
path: ./rust-plugins/sass/npm/linux-x64-gnu
- name: List Files
run: ls -l ./rust-plugins/sass/npm/linux-x64-gnu
- uses: actions/download-artifact@v3
id: download-plugin-sass-darwin-x64
with:
name: ${{ github.sha }}-darwin-x64-plugin-sass
path: ./rust-plugins/sass/npm/darwin-x64
- name: List Files
run: ls -l ./rust-plugins/sass/npm/darwin-x64
- uses: actions/download-artifact@v3
id: download-plugin-sass-win32-x64-msvc
with:
name: ${{ github.sha }}-win32-x64-msvc-plugin-sass
path: ./rust-plugins/sass/npm/win32-x64-msvc
- name: List Files
run: ls -l ./rust-plugins/sass/npm/win32-x64-msvc
- uses: actions/download-artifact@v3
id: download-plugin-sass-darwin-arm64
with:
name: ${{ github.sha }}-darwin-arm64-plugin-sass
path: ./rust-plugins/sass/npm/darwin-arm64
- name: List Files
run: ls -l ./rust-plugins/sass/npm/darwin-arm64
- name: Install Dependencies
run: npm install -g pnpm && pnpm i --frozen-lockfile
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
version: pnpm run bump
publish: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# Test create farm and make sure it works after release
- name: Test Create Farm React
run: cd .. && pnpm create farm my-test-app-react --template react && cd my-test-app-react && pnpm build
- name: Test Create Farm Vue
run: cd .. && pnpm create farm my-test-app-vue --template vue && cd my-test-app-vue && pnpm build
- name: Test Create Farm Solid
run: cd .. && pnpm create farm my-test-app-solid --template solid && cd my-test-app-solid && pnpm build