-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (42 loc) · 1.33 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
name: Build and Release
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install Composer dependencies
run: composer install --ansi --no-progress --no-interaction --prefer-dist --no-dev
- name: Install npm dependencies
run: npm install
- name: Install Sass and Compass
run: sudo gem install sass && sudo gem install compass
- name: Run Grunt
run: grunt
- name: Create zip file
run: zip -r wp-podro-${{ github.ref }}.zip . -x "*.git*" ".gitignore" ".distignore" "composer.*" "Gruntfile.js" "node_modules/*" "package.json" "yarn.lock" ".sass-cache/*" "assets/sass/*" ".wordpress-org/*"
- name: Generate release notes
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Release artifact
uses: actions/upload-artifact@v2
with:
name: wp-podro-${{ github.ref }}
path: wp-podro-${{ github.ref }}.zip