2
2
#
3
3
# https://github.com/nextcloud/.github
4
4
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5
+ #
6
+ # SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
7
+ # SPDX-License-Identifier: MIT
5
8
6
9
name : Build and publish app release
7
10
29
32
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
30
33
31
34
- name : Checkout
32
- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
35
+ uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
33
36
with :
34
37
path : ${{ env.APP_NAME }}
35
38
41
44
expression : " //info//dependencies//nextcloud/@min-version"
42
45
43
46
- name : Read package.json node and npm engines version
44
- uses : skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
47
+ uses : skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
45
48
id : versions
46
49
# Continue if no package.json
47
50
continue-on-error : true
@@ -53,14 +56,14 @@ jobs:
53
56
- name : Set up node ${{ steps.versions.outputs.nodeVersion }}
54
57
# Skip if no package.json
55
58
if : ${{ steps.versions.outputs.nodeVersion }}
56
- uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
59
+ uses : actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
57
60
with :
58
61
node-version : ${{ steps.versions.outputs.nodeVersion }}
59
62
60
63
- name : Set up npm ${{ steps.versions.outputs.npmVersion }}
61
64
# Skip if no package.json
62
65
if : ${{ steps.versions.outputs.npmVersion }}
63
- run : npm i -g npm@" ${{ steps.versions.outputs.npmVersion }}"
66
+ run : npm i -g ' npm@${{ steps.versions.outputs.npmVersion }}'
64
67
65
68
- name : Get php version
66
69
id : php-versions
69
72
filename : ${{ env.APP_NAME }}/appinfo/info.xml
70
73
71
74
- name : Set up php ${{ steps.php-versions.outputs.php-min }}
72
- uses : shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2
75
+ uses : shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
73
76
with :
74
77
php-version : ${{ steps.php-versions.outputs.php-min }}
75
78
coverage : none
78
81
79
82
- name : Check composer.json
80
83
id : check_composer
81
- uses : andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v2
84
+ uses : andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
82
85
with :
83
86
files : " ${{ env.APP_NAME }}/composer.json"
84
87
@@ -96,11 +99,11 @@ jobs:
96
99
run : |
97
100
cd ${{ env.APP_NAME }}
98
101
npm ci
99
- npm run build
102
+ npm run build --if-present
100
103
101
104
- name : Check Krankerl config
102
105
id : krankerl
103
- uses : andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v2
106
+ uses : andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
104
107
with :
105
108
files : ${{ env.APP_NAME }}/krankerl.toml
106
109
@@ -126,12 +129,12 @@ jobs:
126
129
continue-on-error : true
127
130
id : server-checkout
128
131
run : |
129
- NCVERSION=${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}
132
+ NCVERSION=' ${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}'
130
133
wget --quiet https://download.nextcloud.com/server/releases/latest-$NCVERSION.zip
131
134
unzip latest-$NCVERSION.zip
132
135
133
136
- name : Checkout server master fallback
134
- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
137
+ uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
135
138
if : ${{ steps.server-checkout.outcome != 'success' }}
136
139
with :
137
140
submodules : true
@@ -145,7 +148,7 @@ jobs:
145
148
tar -xvf ${{ env.APP_NAME }}.tar.gz
146
149
cd ../../../
147
150
# Setting up keys
148
- echo " ${{ secrets.APP_PRIVATE_KEY }}" > ${{ env.APP_NAME }}.key
151
+ echo ' ${{ secrets.APP_PRIVATE_KEY }}' > ${{ env.APP_NAME }}.key
149
152
wget --quiet "https://github.com/nextcloud/app-certificate-requests/raw/master/${{ env.APP_NAME }}/${{ env.APP_NAME }}.crt"
150
153
# Signing
151
154
php nextcloud/occ integrity:sign-app --privateKey=../${{ env.APP_NAME }}.key --certificate=../${{ env.APP_NAME }}.crt --path=../${{ env.APP_NAME }}/build/artifacts/${{ env.APP_NAME }}
0 commit comments