22#
33# https://github.com/nextcloud/.github
44# 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
58
69name : Build and publish app release
710
2932 echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
3033
3134 - name : Checkout
32- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
35+ uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
3336 with :
3437 path : ${{ env.APP_NAME }}
3538
4144 expression : " //info//dependencies//nextcloud/@min-version"
4245
4346 - 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
4548 id : versions
4649 # Continue if no package.json
4750 continue-on-error : true
6063 - name : Set up npm ${{ steps.versions.outputs.npmVersion }}
6164 # Skip if no package.json
6265 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 }}'
6467
6568 - name : Get php version
6669 id : php-versions
6972 filename : ${{ env.APP_NAME }}/appinfo/info.xml
7073
7174 - name : Set up php ${{ steps.php-versions.outputs.php-min }}
72- uses : shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2
75+ uses : shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2.31.0
7376 with :
7477 php-version : ${{ steps.php-versions.outputs.php-min }}
7578 coverage : none
7881
7982 - name : Check composer.json
8083 id : check_composer
81- uses : andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v2
84+ uses : andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
8285 with :
8386 files : " ${{ env.APP_NAME }}/composer.json"
8487
@@ -92,15 +95,15 @@ jobs:
9295 # Skip if no package.json
9396 if : ${{ steps.versions.outputs.nodeVersion }}
9497 env :
95- CYPRESS_INSTALL_BINARY : 0
98+ NODE_ENV : production
9699 run : |
97100 cd ${{ env.APP_NAME }}
98101 npm ci
99- npm run build
102+ npm run build --if-present
100103
101104 - name : Check Krankerl config
102105 id : krankerl
103- uses : andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v2
106+ uses : andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
104107 with :
105108 files : ${{ env.APP_NAME }}/krankerl.toml
106109
@@ -126,12 +129,12 @@ jobs:
126129 continue-on-error : true
127130 id : server-checkout
128131 run : |
129- NCVERSION=${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}
132+ NCVERSION=' ${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}'
130133 wget --quiet https://download.nextcloud.com/server/releases/latest-$NCVERSION.zip
131134 unzip latest-$NCVERSION.zip
132135
133136 - name : Checkout server master fallback
134- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
137+ uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
135138 if : ${{ steps.server-checkout.outcome != 'success' }}
136139 with :
137140 submodules : true
@@ -145,7 +148,7 @@ jobs:
145148 tar -xvf ${{ env.APP_NAME }}.tar.gz
146149 cd ../../../
147150 # Setting up keys
148- echo " ${{ secrets.APP_PRIVATE_KEY }}" > ${{ env.APP_NAME }}.key
151+ echo ' ${{ secrets.APP_PRIVATE_KEY }}' > ${{ env.APP_NAME }}.key
149152 wget --quiet "https://github.com/nextcloud/app-certificate-requests/raw/master/${{ env.APP_NAME }}/${{ env.APP_NAME }}.crt"
150153 # Signing
151154 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