-
-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (42 loc) · 1.51 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Publish release
on:
push:
tags:
- '*'
jobs:
release:
name: Publish release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: xdebug
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install Composer dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader --no-suggest --no-dev
- name: Cleanup unnecessary files
run: rm -rf .git .github .editorconfig .prettierrc .gitattributes .gitignore assets composer.json composer.lock package.json yarn.lock webpack.mix.js tailwind.config.js
- name: Get the version
id: get_version
run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\//}
shell: bash
- name: Create subfolder
run: mkdir gutentweaks && mv ./* gutentweaks/ 2>/dev/null
continue-on-error: true
- name: Create distributable zip file
uses: montudor/[email protected]
with:
args: zip -qq -r9 gutentweaks.zip gutentweaks
- name: Upload zip as release asset
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: gutentweaks.zip
asset_name: gutentweaks-${{ steps.get_version.outputs.version }}.zip
tag: ${{ github.ref }}
overwrite: true