Skip to content

Commit b99a446

Browse files
authored
Update build (#197)
* Don't start building in the theme directory * Testing new build workflow
1 parent 0288bd6 commit b99a446

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

.github/workflows/release-build.yaml

+23-21
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,7 @@ jobs:
1515
with:
1616
ref: ${{ github.ref }}
1717

18-
- name: Setup Node for plugin
19-
uses: actions/setup-node@v2
20-
with:
21-
node-version: '20.11'
22-
cache: 'npm'
23-
cache-dependency-path: './plugin'
24-
- working-directory: './plugin'
25-
run: npm ci && npm run build
2618

27-
- name: Build plugin
28-
run: |
29-
mkdir -p temp/wpcloud-station
30-
cd plugin
31-
zip -r ../temp/wpcloud-station/plugin.zip . [email protected]
32-
cd ../temp/wpcloud-station
33-
unzip plugin.zip
34-
cd ../..
35-
zip -r ./plugin.zip temp/wpcloud-station
36-
rm -rf temp
3719

3820
- name: Setup Node for theme
3921
uses: actions/setup-node@v2
@@ -45,17 +27,37 @@ jobs:
4527
run: npm ci && npm run build:css
4628

4729
- name: Build Theme
48-
working-directory: './theme'
4930
run: |
50-
mkdir -p temp/wpcloud-station
51-
cd theme
31+
mkdir -p ./temp/wpcloud-station
32+
cd ./theme
5233
zip -r ../temp/wpcloud-station/theme.zip . [email protected]
5334
cd ../temp/wpcloud-station
5435
unzip theme.zip
5536
cd ../..
5637
zip -r ./theme.zip temp/wpcloud-station
5738
rm -rf temp
5839
40+
- name: Setup Node for plugin
41+
uses: actions/setup-node@v2
42+
with:
43+
node-version: '20.11'
44+
cache: 'npm'
45+
cache-dependency-path: './plugin'
46+
47+
- working-directory: './plugin'
48+
run: npm ci && npm run build
49+
50+
- name: Build plugin
51+
run: |
52+
mkdir -p ./temp/wpcloud-station
53+
cd ./plugin
54+
zip -r ../temp/wpcloud-station/plugin.zip . [email protected]
55+
cd ../temp/wpcloud-station
56+
unzip plugin.zip
57+
cd ../..
58+
zip -r ./plugin.zip temp/wpcloud-station
59+
rm -rf temp
60+
5961
- name: Get release
6062
id: get_release
6163
uses: bruceadams/[email protected]

0 commit comments

Comments
 (0)