@@ -2,11 +2,11 @@ name: Tests
2
2
3
3
on :
4
4
push :
5
- branches : [development , production]
5
+ branches : [dev , production]
6
6
tags :
7
7
- ' *.*.*'
8
8
pull_request :
9
- branches : [development , production]
9
+ branches : [dev , production]
10
10
11
11
jobs :
12
12
tests :
@@ -16,13 +16,13 @@ jobs:
16
16
strategy :
17
17
fail-fast : false
18
18
matrix :
19
- php : [8.0 , 8.1 ]
19
+ php : [8.1 , 8.2 ]
20
20
os : [ubuntu-20.04]
21
21
wordpress : [6.1.1, latest]
22
22
include :
23
23
- experimental : true
24
24
- experimental : false
25
- php : 8.0
25
+ php : 8.1
26
26
wordpress : 6.1.1
27
27
28
28
name : Tests - PHP ${{ matrix.php }} - WP ${{ matrix.wordpress }}
81
81
token : ${{ secrets.CODECOV_TOKEN }}
82
82
if : matrix.experimental == false
83
83
84
+ - name : Prepare Build
85
+ if : startsWith(github.ref, 'refs/tags/') && matrix.experimental == false
86
+ run : |
87
+ export COMPOSER_MEMORY_LIMIT=-1
88
+ export GITHUB_BUILD_PATH=${{github.workspace}}
89
+ export GITHUB_REPO_SLUG="$(basename ${{github.workspace}})"
90
+ export GITHUB_TAG="$(basename ${{github.ref}})"
91
+ echo "File to be created : $GITHUB_BUILD_PATH/$GITHUB_REPO_SLUG-$GITHUB_TAG.zip"
92
+ curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
93
+ chmod +x wp-cli.phar
94
+ mv wp-cli.phar /usr/local/bin/wp
95
+ wp package install wp-cli/dist-archive-command
96
+ npm install
97
+ npm run build
98
+ composer install --no-dev --optimize-autoloader
99
+ cd ..
100
+ wp dist-archive $GITHUB_REPO_SLUG $GITHUB_BUILD_PATH/$GITHUB_REPO_SLUG-$GITHUB_TAG.zip
101
+ cd $GITHUB_BUILD_PATH
102
+ ls $GITHUB_BUILD_PATH
103
+
104
+ - name : Deploy
105
+ if : startsWith(github.ref, 'refs/tags/') && matrix.experimental == false
106
+ uses : softprops/action-gh-release@v1
107
+ env :
108
+ GITHUB_TOKEN : ${{ secrets.PAT_FOR_GITHUB_ACTIONS }}
109
+ with :
110
+ files :
111
+ ${{github.workspace}}/*.zip
112
+
84
113
- name : Trigger Bedrock Update
85
114
if : github.ref == 'refs/heads/development' && matrix.experimental == false
86
115
uses : pressbooks/composer-autoupdate-bedrock@v1
0 commit comments