-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
115 lines (96 loc) · 3.2 KB
/
action.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: 'PDK semantic release'
description: 'Runs semantic release in a pdk context. Requires app builder release step to be present in release config.'
inputs:
app-id:
description: 'The app ID of the app.'
required: true
private-key:
description: 'The private key of the app.'
required: true
node-version:
description: 'Node version to use'
required: false
yarn-args:
description: 'Arguments to use with yarn install'
required: false
php-version:
description: 'PHP version that is used'
required: false
default: '7.4'
php-scoper-version:
description: 'PHP Scoper Version'
required: false
default: '^0.18.0'
vendor-key:
description: 'Composer key to use for caching in addition to the vendor files. For example the arguments used in composer install.'
required: false
source-files:
description: 'List of files to use for source caching'
required: true
vendor-files:
description: 'List of files to use for vendor caching'
required: false
default: |
composer.json
composer.lock
scoper.inc.php
scoper.*.inc.php
update-deps:
description: 'Update PDK dependencies before releasing.'
required: false
outputs:
released:
description: 'Whether a release was made.'
value: ${{ steps.release.outputs.released }}
version:
description: 'The version that was released.'
value: ${{ steps.release.outputs.version }}
runs:
using: composite
steps:
- uses: myparcelnl/actions/setup-git-credentials@v4
id: credentials
with:
app-id: ${{ inputs.app-id }}
private-key: ${{ inputs.private-key }}
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ steps.credentials.outputs.token }}
- uses: myparcelnl/actions/pdk-setup@v4
if: inputs.update-deps != 'true'
id: setup
with:
php-version: ${{ inputs.php-version }}
node-version: ${{ inputs.node-version }}
yarn-args: ${{ inputs.yarn-args }}
composer-dev: false
- uses: myparcelnl/actions/pdk-setup-upgrade@v4
if: inputs.update-deps == 'true'
with:
app-id: ${{ inputs.app-id }}
private-key: ${{ inputs.private-key }}
php-version: ${{ inputs.php-version }}
node-version: ${{ inputs.node-version }}
yarn-args: ${{ inputs.yarn-args }}
composer-dev: false
- uses: myparcelnl/actions/pdk-cache@v4
with:
php-version: ${{ inputs.php-version }}
php-scoper-version: ${{ inputs.php-scoper-version }}
source-files: ${{ inputs.source-files }}
vendor-files: ${{ inputs.vendor-files }}
vendor-key: install-${{ steps.setup.outputs.composer-flags }}
- uses: myparcelnl/actions/pdk-create-root-command@v4
id: prepare
with:
env-file: ${{ steps.setup.outputs.env-file }}
image: ${{ steps.setup.outputs.image }}
# The pdk-builder release step should be run through the release config
- uses: myparcelnl/actions/semantic-release@v4
id: release
env:
PDK_ROOT_COMMAND: ${{ steps.prepare.outputs.root-command }}
with:
token: ${{ steps.credentials.outputs.token }}
write-summary: true