1212 release :
1313 types : [published]
1414
15+ permissions :
16+ contents : write
17+
1518jobs :
1619 build_and_publish :
1720 runs-on : ubuntu-latest
@@ -32,13 +35,14 @@ jobs:
3235 echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
3336
3437 - name : Checkout
35- uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
38+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3639 with :
40+ persist-credentials : false
3741 path : ${{ env.APP_NAME }}
3842
3943 - name : Get app version number
4044 id : app-version
41- uses : skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # master
45+ uses : skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # v1.0.0
4246 with :
4347 filename : ${{ env.APP_NAME }}/appinfo/info.xml
4448 expression : " //info//version/text()"
4953
5054 - name : Get appinfo data
5155 id : appinfo
52- uses : skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # master
56+ uses : skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # v1.0.0
5357 with :
5458 filename : ${{ env.APP_NAME }}/appinfo/info.xml
5559 expression : " //info//dependencies//nextcloud/@min-version"
6165 continue-on-error : true
6266 with :
6367 path : ${{ env.APP_NAME }}
64- fallbackNode : ' ^20 '
65- fallbackNpm : ' ^10 '
68+ fallbackNode : ' ^24 '
69+ fallbackNpm : ' ^11.3 '
6670
6771 - name : Set up node ${{ steps.versions.outputs.nodeVersion }}
6872 # Skip if no package.json
8387 filename : ${{ env.APP_NAME }}/appinfo/info.xml
8488
8589 - name : Set up php ${{ steps.php-versions.outputs.php-min }}
86- uses : shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
90+ uses : shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
8791 with :
8892 php-version : ${{ steps.php-versions.outputs.php-min }}
8993 coverage : none
@@ -136,22 +140,31 @@ jobs:
136140 cd ${{ env.APP_NAME }}
137141 make appstore
138142
139- - name : Checkout server ${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}
140- continue-on-error : true
141- id : server-checkout
143+ - name : Check server download link for ${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}
142144 run : |
143145 NCVERSION='${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}'
144- wget --quiet https://download.nextcloud.com/server/releases/latest-$NCVERSION.zip
145- unzip latest-$NCVERSION.zip
146+ DOWNLOAD_URL=$(curl -s "https://updates.nextcloud.com/updater_server/latest?channel=beta&version=$NCVERSION" | jq -r '.downloads.zip[0]')
147+ echo "DOWNLOAD_URL=$DOWNLOAD_URL" >> $GITHUB_ENV
148+
149+ - name : Download server ${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}
150+ continue-on-error : true
151+ id : server-download
152+ if : ${{ env.DOWNLOAD_URL != 'null' }}
153+ run : |
154+ echo "Downloading release tarball from $DOWNLOAD_URL"
155+ wget $DOWNLOAD_URL -O nextcloud.zip
156+ unzip nextcloud.zip
146157
147158 - name : Checkout server master fallback
148- uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
149- if : ${{ steps.server-checkout .outcome != 'success' }}
159+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
160+ if : ${{ steps.server-download .outcome != 'success' }}
150161 with :
162+ persist-credentials : false
151163 submodules : true
152164 repository : nextcloud/server
153165 path : nextcloud
154166
167+
155168 - name : Sign app
156169 run : |
157170 # Extracting release
@@ -168,7 +181,7 @@ jobs:
168181 tar -zcvf ${{ env.APP_NAME }}.tar.gz ${{ env.APP_NAME }}
169182
170183 - name : Attach tarball to github release
171- uses : svenstaro/upload-release-action@6b7fa9f267e90b50a19fef07b3596790bb941741 # v2
184+ uses : svenstaro/upload-release-action@6b7fa9f267e90b50a19fef07b3596790bb941741 # v2.11.3
172185 id : attach_to_release
173186 with :
174187 repo_token : ${{ secrets.GITHUB_TOKEN }}
@@ -178,7 +191,7 @@ jobs:
178191 overwrite : true
179192
180193 - name : Upload app to Nextcloud appstore
181- uses : nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 # v1
194+ uses : nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 # v1.0.3
182195 with :
183196 app_name : ${{ env.APP_NAME }}
184197 appstore_token : ${{ secrets.APPSTORE_TOKEN }}
0 commit comments