File tree 4 files changed +14619
-3352
lines changed
4 files changed +14619
-3352
lines changed Original file line number Diff line number Diff line change
1
+ name : Release
2
+ on :
3
+ push :
4
+ branches :
5
+ - main
6
+ jobs :
7
+ release :
8
+ name : Release
9
+ runs-on : ubuntu-18.04
10
+ steps :
11
+ - name : Checkout
12
+ uses : actions/checkout@v2
13
+ with :
14
+ fetch-depth : 0
15
+
16
+ # PHP --------------------------------------------------------------------
17
+ - name : Setup PHP 7.4 environment
18
+ uses : nanasess/setup-php@v3.0.6
19
+ with :
20
+ php-version : 7.4
21
+
22
+ - name : Validate composer.json and composer.lock
23
+ run : composer validate
24
+
25
+ - name : Get Composer cache directory
26
+ id : composer-cache
27
+ run : |
28
+ echo "::set-output name=dir::$(composer config cache-files-dir)"
29
+
30
+ - name : Composer (cache)
31
+ uses : actions/cache@v2
32
+ with :
33
+ path : ${{ steps.composer-cache.outputs.dir }}
34
+ key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
35
+ restore-keys : |
36
+ ${{ runner.os }}-composer-
37
+
38
+ - name : Install dependencies
39
+ run : composer install --prefer-dist --no-progress
40
+
41
+ - name : Linting PHP code
42
+ run : composer cs:php
43
+
44
+ # npm --------------------------------------------------------------------
45
+ - name : Setup Node.js environment
46
+ uses : actions/setup-node@v2.1.2
47
+ with :
48
+ node-version : ' 12'
49
+
50
+ - name : Get npm cache directory
51
+ id : npm-cache-dir
52
+ run : |
53
+ echo "::set-output name=dir::$(npm config get cache)"
54
+
55
+ - name : NPM (cache)
56
+ uses : actions/cache@v2
57
+ id : npm-cache
58
+ with :
59
+ path : ${{ steps.npm-cache-dir.outputs.dir }}
60
+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
61
+ restore-keys : |
62
+ ${{ runner.os }}-node-
63
+
64
+ - name : Install Node.js dependencies
65
+ run : npm install
66
+
67
+ - name : Linting general code
68
+ run : npm run cs:lint
69
+
70
+ - name : Release
71
+ env :
72
+ GITHUB_TOKEN : ${{ github.token }}
73
+ run : npx semantic-release
Original file line number Diff line number Diff line change 1
1
# PHP Code Sniffer Helpers
2
2
3
3
[ ![ Commitizen friendly] ( https://img.shields.io/badge/commitizen-friendly-brightgreen.svg )] ( http://commitizen.github.io/cz-cli/ )
4
+ [ ![ semantic-release] ( https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg )] ( https://github.com/nelson6e65/code-sniffer-helpers )
4
5
![ Packagist PHP Version Support] ( https://img.shields.io/packagist/php-v/nelson6e65/code-sniffer-helpers )
5
6
6
7
[ ![ GitHub release] ( https://img.shields.io/github/tag/nelson6e65/php-code-sniffer-helpers.svg?logo=github )] ( https://github.com/nelson6e65/php-code-sniffer-helpers/tags )
You can’t perform that action at this time.
0 commit comments