-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (63 loc) · 2.23 KB
/
nightly.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
---
# -------------------------------------------------------------------------------------------------
# Job Name
# -------------------------------------------------------------------------------------------------
name: nightly
# -------------------------------------------------------------------------------------------------
# When to run
# -------------------------------------------------------------------------------------------------
on:
# Runs manually
workflow_dispatch:
# Runs daily
schedule:
- cron: '0 0 * * *'
# -------------------------------------------------------------------------------------------------
# What to run
# -------------------------------------------------------------------------------------------------
jobs:
nightly:
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: Get current date
run: echo "today=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Checkout EspoCRM
uses: actions/checkout@v4
with:
repository: espocrm/espocrm
ref: refs/heads/master
fetch-depth: 0
- name: Get latest version
run: echo "version=$(git tag | sort --version-sort | tail -n1)" >> $GITHUB_ENV
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 18
- name: Setup PHP with Composer
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
tools: composer:v2
ini-values: memory_limit=1024M
- name: NPM Install
run: npm ci
- name: Full Build
run: grunt
- name: Create a ZIP archive
run: cd build/EspoCRM-* && zip --quiet --recurse-paths ../../EspoCRM-full.zip *
- name: Create an Upgrade Package
run: node diff ${{ env.version }}
- name: Rename an Upgrade Package
run: mv build/EspoCRM-upgrade-*.zip EspoCRM-upgrade.zip
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: "EspoCRM-*.zip"
tag: nightly-${{ env.today }}
name: ${{ env.version }}-${{ env.today }}
commit: main
omitBody: true
allowUpdates: true
removeArtifacts: true