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,25 @@ jobs:
3235 echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
3336
3437 - name : Checkout
35- uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
38+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3639 with :
40+ persist-credentials : false
3741 path : ${{ env.APP_NAME }}
3842
43+ - name : Get app version number
44+ id : app-version
45+ uses : skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # v1.0.0
46+ with :
47+ filename : ${{ env.APP_NAME }}/appinfo/info.xml
48+ expression : " //info//version/text()"
49+
50+ - name : Validate app version against tag
51+ run : |
52+ [ "${{ env.APP_VERSION }}" = "v${{ fromJSON(steps.app-version.outputs.result).version }}" ]
53+
3954 - name : Get appinfo data
4055 id : appinfo
41- uses : skjnldsv/xpath-action@7e6a7c379d0e9abc8acaef43df403ab4fc4f770c # master
56+ uses : skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # v1.0.0
4257 with :
4358 filename : ${{ env.APP_NAME }}/appinfo/info.xml
4459 expression : " //info//dependencies//nextcloud/@min-version"
5671 - name : Set up node ${{ steps.versions.outputs.nodeVersion }}
5772 # Skip if no package.json
5873 if : ${{ steps.versions.outputs.nodeVersion }}
59- uses : actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
74+ uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
6075 with :
6176 node-version : ${{ steps.versions.outputs.nodeVersion }}
6277
7287 filename : ${{ env.APP_NAME }}/appinfo/info.xml
7388
7489 - name : Set up php ${{ steps.php-versions.outputs.php-min }}
75- uses : shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
90+ uses : shivammathur/setup-php@20529878ed81ef8e78ddf08b480401e6101a850f # v2.35.3
7691 with :
7792 php-version : ${{ steps.php-versions.outputs.php-min }}
7893 coverage : none
@@ -134,9 +149,10 @@ jobs:
134149 unzip latest-$NCVERSION.zip
135150
136151 - name : Checkout server master fallback
137- uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
152+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
138153 if : ${{ steps.server-checkout.outcome != 'success' }}
139154 with :
155+ persist-credentials : false
140156 submodules : true
141157 repository : nextcloud/server
142158 path : nextcloud
@@ -157,7 +173,7 @@ jobs:
157173 tar -zcvf ${{ env.APP_NAME }}.tar.gz ${{ env.APP_NAME }}
158174
159175 - name : Attach tarball to github release
160- uses : svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2
176+ uses : svenstaro/upload-release-action@81c65b7cd4de9b2570615ce3aad67a41de5b1a13 # v2.11.2
161177 id : attach_to_release
162178 with :
163179 repo_token : ${{ secrets.GITHUB_TOKEN }}
@@ -167,7 +183,7 @@ jobs:
167183 overwrite : true
168184
169185 - name : Upload app to Nextcloud appstore
170- uses : nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 # v1
186+ uses : nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 # v1.0.3
171187 with :
172188 app_name : ${{ env.APP_NAME }}
173189 appstore_token : ${{ secrets.APPSTORE_TOKEN }}
0 commit comments