-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (70 loc) · 1.88 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Release
on:
push:
tags:
- '*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get the repository name
id: get_repo_name
run: echo ::set-output name=REPOSITORY_NAME::$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}')
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- name: Create Zip File
uses: thedoctor0/zip-release@master
if: startsWith(github.ref, 'refs/tags/')
with:
filename: '${{ steps.get_repo_name.outputs.REPOSITORY_NAME }}.zip'
exclusions: '.babelrc
.circleci/config.yml
.deployignore
.distignore
.DS_Store
.editorconfig
.eslint*
.idea
.phpcs.xml
.phpcs.xml.dist
.travis.yml
.vscode
*.git*
*.lock
*.log
*.sql
*.tar.gz
*.zip
behat.yml
bin
bitbucket-pipelines.yml
circle.yml
composer*
dependencies.yml
Gruntfile.js
gulp*
multisite.*
node_modules
package*
phpcs*
phpunit*
README.md
src
stylelint*
tests
Thumbs.db
tsconfig.json
vendor
webpack.config.js
wp-cli.local.yml'
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{ steps.get_repo_name.outputs.REPOSITORY_NAME }}.zip
name: Version ${{ steps.get_version.outputs.VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}