@@ -12,10 +12,13 @@ jobs:
1212 APP_ID : integration_discourse
1313 runs-on : ubuntu-latest
1414 steps :
15- - name : Use Node 12
16- uses : actions/setup-node@v1
15+ - name : Use Node 14
16+ uses : actions/setup-node@v2
1717 with :
18- node-version : 12
18+ node-version : 14
19+
20+ - name : Set up npm
21+ run : npm i -g npm
1922
2023 - name : Setup PHP
2124 uses : shivammathur/setup-php@v2
9598 asset_content_type : application/gzip
9699
97100 - name : Publish to appstore
98- if : ${{ startsWith( steps.tag.outputs.currenttag , 'v' ) }}
101+ if : ${{ startsWith( steps.tag.outputs.currenttag , 'v' ) && !endsWith( steps.tag.outputs.currenttag , 'nightly' ) }}
99102 id : publish
100103 run : |
101104 SIGNATURE=$(cat /tmp/build/sign.txt | tr -d '\n')
@@ -104,3 +107,14 @@ jobs:
104107 curl -X POST -H "Authorization: Token $APPSTORE_TOKEN" https://apps.nextcloud.com/api/v1/apps/releases -H "Content-Type: application/json" -d '{"download":"'${DOWNLOAD_URL}'", "signature": "'${SIGNATURE}'"}'
105108 env :
106109 APPSTORE_TOKEN : ${{ secrets.APPSTORE_TOKEN }}
110+
111+ - name : Publish nightly release to appstore
112+ if : ${{ startsWith( steps.tag.outputs.currenttag , 'v' ) && endsWith( steps.tag.outputs.currenttag , 'nightly' ) }}
113+ id : nightly
114+ run : |
115+ SIGNATURE=$(cat /tmp/build/sign.txt | tr -d '\n')
116+ VERSION=${{ steps.build_release.outputs.version }}
117+ DOWNLOAD_URL=https://github.com/${{ github.repository }}/releases/download/v${VERSION}/${APP_ID}-${VERSION}.tar.gz
118+ curl -X POST -H "Authorization: Token $APPSTORE_TOKEN" https://apps.nextcloud.com/api/v1/apps/releases -H "Content-Type: application/json" -d '{"download":"'${DOWNLOAD_URL}'", "signature": "'${SIGNATURE}'", "nightly": true}'
119+ env :
120+ APPSTORE_TOKEN : ${{ secrets.APPSTORE_TOKEN }}
0 commit comments