forked from wpengine/frost
-
Notifications
You must be signed in to change notification settings - Fork 1
85 lines (73 loc) · 2.15 KB
/
release-please.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
73
74
75
76
77
78
79
80
81
82
83
84
85
on:
push:
branches:
- trunk
permissions:
contents: write
pull-requests: write
name: release-please
jobs:
release-please:
if: github.event_name != 'pull_request' && github.event.pull_request.merged != true
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
command: manifest
release-type: php
package-name: ash
bump-minor-pre-major: true
token: ${{ secrets.GH_BOT_TOKEN }}
versioning-strategy: always-bump-patch
build:
needs: release-please
runs-on: ubuntu-latest
if: ${{ needs.release-please.outputs.release_created }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Get Version From Tag
id: get_version
uses: actions-ecosystem/[email protected]
with:
semver_only: true
- name: Latest Version
id: latest_version
run: |
TAG=${{ steps.get_version.outputs.tag }}
echo ::set-output name=VERSION::${TAG#v}
- name: Cache Composer dependencies
uses: actions/cache@v3
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- name: Composer Install
uses: php-actions/composer@v6
with:
working_dir: ./
dev: no
php_version: 7.4
- name: Build Base Assets
run: |
npm install && npm run build
rm -rf node_modules
- name: Clean Build Files/Folders
run: |
chmod +x ./.deployment/cleanup.sh
sh ./.deployment/cleanup.sh;
- name: Create Sync Zip
run: |
cd ./zip
zip -r ../ash.zip ./
cd ../
- name: Upload files to a GitHub release
uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ash.zip
tag: ${{ steps.get_version.outputs.tag }}
name: ash.zip
overwrite: true