File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish release
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' *'
7
+
8
+ jobs :
9
+ release :
10
+ name : Publish release
11
+ runs-on : ubuntu-latest
12
+ strategy :
13
+ matrix :
14
+ php-versions : ['7.3', '7.4', '8.0']
15
+
16
+ steps :
17
+ - name : Checkout
18
+ uses : actions/checkout@v2
19
+ - name : Setup PHP, with composer and extensions
20
+ uses : shivammathur/setup-php@v2
21
+ with :
22
+ php-version : ${{ matrix.php-versions }}
23
+ coverage : xdebug
24
+ env :
25
+ COMPOSER_TOKEN : ${{ secrets.GITHUB_TOKEN }}
26
+ - name : Install Composer dependencies
27
+ run : composer install --no-progress --prefer-dist --optimize-autoloader --no-suggest --no-dev
28
+ - name : Cleanup unnecessary files
29
+ run : rm -rf .git .github .editorconfig .gitattributes .gitignore composer.json composer.lock phpcs.xml.dist phpunit.xml.dist tests
30
+ - name : Get the version
31
+ id : get_version
32
+ run : echo ::set-output name=version::${GITHUB_REF/refs\/tags\//}
33
+ shell : bash
34
+ - name : Create subfolder
35
+ run : mkdir acorn && mv ./* acorn/ 2>/dev/null
36
+ continue-on-error : true
37
+ - name : Create distributable zip file
38
+ uses : montudor/action-zip@v0.1.0
39
+ with :
40
+ args : zip -qq -r9 acorn.zip acorn
41
+ - name : Upload zip as release asset
42
+ uses : svenstaro/upload-release-action@v2
43
+ with :
44
+ repo_token : ${{ secrets.GITHUB_TOKEN }}
45
+ file : acorn.zip
46
+ asset_name : acorn-${{ steps.get_version.outputs.version }}-php-${{ matrix.php-versions }}.zip
47
+ tag : ${{ github.ref }}
48
+ overwrite : true
You can’t perform that action at this time.
0 commit comments