File tree 1 file changed +25
-5
lines changed
1 file changed +25
-5
lines changed Original file line number Diff line number Diff line change @@ -2,22 +2,42 @@ name: CI
2
2
3
3
on :
4
4
push :
5
+ branches : [ master ]
5
6
tags :
6
7
- " *.*.*"
7
8
8
9
jobs :
9
- release :
10
+ test :
10
11
runs-on : ubuntu-latest
12
+ steps :
13
+ - uses : actions/checkout@v4
14
+ - name : Install PHP
15
+ uses : shivammathur/setup-php@v2
16
+ with :
17
+ php-version : 8.3
18
+ tools : composer:v2
19
+ - name : Cache Composer packages
20
+ uses : actions/cache@v4
21
+ with :
22
+ path : vendor
23
+ key : composer-${{ hashFiles('composer.json') }}
24
+ - name : Install composer packages
25
+ run : composer install
26
+ - name : Test PHPUnit
27
+ run : vendor/bin/phpunit
11
28
29
+ release :
30
+ runs-on : ubuntu-latest
31
+ if : startsWith(github.event.ref, 'refs/tags/')
32
+ needs : test
12
33
steps :
13
- - uses : actions/checkout@v2
14
- - uses : actions/setup-node@v2
34
+ - uses : actions/checkout@v4
35
+ - uses : actions/setup-node@v4
15
36
with :
16
- node-version : ' 14.x'
17
37
registry-url : ' https://registry.npmjs.org'
18
38
- run : npm install && npm run build
19
39
- run : npm publish --access public
20
40
env :
21
41
NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
22
42
- name : Release
23
- uses : softprops/action-gh-release@v1
43
+ uses : softprops/action-gh-release@v2
You can’t perform that action at this time.
0 commit comments