diff options
author | Julien Veyssier <eneiluj@posteo.net> | 2021-03-22 14:37:25 +0300 |
---|---|---|
committer | Julien Veyssier <eneiluj@posteo.net> | 2021-03-22 15:28:29 +0300 |
commit | ae1eb05bb311fab2ec55e4dacdaaeed97176ab71 (patch) | |
tree | 610380a379c32886e6c83ddbe457eb9a0bc2c5a1 | |
parent | 1a76b935a2459be64abfbdb86072129d12e45856 (diff) |
test release action with a nightlyv0.1.9-7-nightly
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
-rw-r--r-- | .github/workflows/release.yml | 12 | ||||
-rw-r--r-- | Makefile | 23 | ||||
-rw-r--r-- | appinfo/info.xml | 4 |
3 files changed, 24 insertions, 15 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 251f7f96..ed6fa22d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -57,15 +57,15 @@ jobs: sed -i $'s|if (substr($fullPath, 0, strlen($root) + 1) === $root . \'/\')|if (is_string($root) and substr($fullPath, 0, strlen($root) + 1) === $root . \'/\')|g' ~/html/nextcloud/lib/autoloader.php cp -r $GITHUB_WORKSPACE ~/html/nextcloud/apps/${APP_ID} php ~/html/nextcloud/occ maintenance:install --database "sqlite" --admin-user "admin" --admin-pass "password" - php ~/html/nextcloud/occ app:enable ${APP_ID} - php ~/html/nextcloud/occ maintenance:mode --off cd ~/html/nextcloud/apps/${APP_ID} echo "###### make" webserveruser=runner occ_dir=~/html/nextcloud make > /dev/null + php ~/html/nextcloud/occ app:enable ${APP_ID} + php ~/html/nextcloud/occ maintenance:mode --off echo "###### make appstore" tag=${{ steps.tag.outputs.currenttag }} version=${tag/v/} - webserveruser=runner occ_dir=~/html/nextcloud version=$version make build_release + webserveruser=runner occ_dir=~/html/nextcloud version=$version make appstore echo "##[set-output name=version;]$version" env: APP_CRT: ${{ secrets.APP_CRT }} @@ -91,7 +91,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: /tmp/build/${{ steps.build_release.outputs.app_id }}-${{ steps.build_release.outputs.version }}.tar.gz + asset_path: ~/html/nextcloud/apps/${{ steps.build_release.outputs.app_id }}/build/artifacts/appstore/${{ steps.build_release.outputs.app_id }}-${{ steps.build_release.outputs.version }}.tar.gz asset_name: ${{ steps.build_release.outputs.app_id }}-${{ steps.build_release.outputs.version }}.tar.gz asset_content_type: application/gzip @@ -99,7 +99,7 @@ jobs: if: ${{ startsWith( steps.tag.outputs.currenttag , 'v' ) && !endsWith( steps.tag.outputs.currenttag , 'nightly' ) }} id: publish run: | - SIGNATURE=$(cat /tmp/build/sign.txt | tr -d '\n') + SIGNATURE=$(cat ~/html/nextcloud/apps/${APP_ID}/build/artifacts/appstore/sign.txt | tr -d '\n') VERSION=${{ steps.build_release.outputs.version }} DOWNLOAD_URL=https://github.com/${{ github.repository }}/releases/download/v${VERSION}/${APP_ID}-${VERSION}.tar.gz 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}'"}' @@ -110,7 +110,7 @@ jobs: if: ${{ startsWith( steps.tag.outputs.currenttag , 'v' ) && endsWith( steps.tag.outputs.currenttag , 'nightly' ) }} id: nightly run: | - SIGNATURE=$(cat /tmp/build/sign.txt | tr -d '\n') + SIGNATURE=$(cat ~/html/nextcloud/apps/${APP_ID}/build/artifacts/appstore/sign.txt | tr -d '\n') VERSION=${{ steps.build_release.outputs.version }} DOWNLOAD_URL=https://github.com/${{ github.repository }}/releases/download/v${VERSION}/${APP_ID}-${VERSION}.tar.gz 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}' @@ -161,6 +161,8 @@ appstore: --exclude=js/bower.json \ --exclude=js/karma.* \ --exclude=js/protractor.* \ + --exclude=babel.config.js \ + --exclude=webpack.*.js \ --exclude=package.json \ --exclude=bower.json \ --exclude=karma.* \ @@ -169,14 +171,21 @@ appstore: --exclude=.* \ --exclude=js/.* \ ../$(app_name) $(appstore_build_directory) - # give the webserver user the right to create signature file - sudo chown $(webserveruser) $(appstore_package_name)/appinfo - sudo -u $(webserveruser) php $(occ_dir)/occ integrity:sign-app --privateKey=$(cert_dir)/$(app_name).key --certificate=$(cert_dir)/$(app_name).crt --path=$(appstore_package_name)/ - sudo chown -R $(USER) $(appstore_package_name)/appinfo - tar -czf $(appstore_package_name)-$(app_version).tar.gz \ + @if [ -f $(cert_dir)/$(app_name).key ]; then \ + sudo chown $(webserveruser) $(appstore_build_directory)/$(app_name)/appinfo ;\ + sudo -u $(webserveruser) php $(occ_dir)/occ integrity:sign-app --privateKey=$(cert_dir)/$(app_name).key --certificate=$(cert_dir)/$(app_name).crt --path=$(appstore_build_directory)/$(app_name)/ ;\ + sudo chown -R $(USER) $(appstore_build_directory)/$(app_name)/appinfo ;\ + else \ + echo "!!! WARNING signature key not found" ;\ + fi + tar -czf $(appstore_build_directory)/$(app_name)-$(app_version).tar.gz \ -C $(appstore_build_directory) $(app_name) - echo NEXTCLOUD------------------------------------------ - openssl dgst -sha512 -sign $(cert_dir)/$(app_name).key $(appstore_package_name)-$(app_version).tar.gz | openssl base64 + echo "Archive written in" + echo $(appstore_build_directory)/$(app_name)-$(app_version).tar.gz + @if [ -f $(cert_dir)/$(app_name).key ]; then \ + echo NEXTCLOUD------------------------------------------ ;\ + openssl dgst -sha512 -sign $(cert_dir)/$(app_name).key $(appstore_build_directory)/$(app_name)-$(app_version).tar.gz | openssl base64 | tee $(appstore_build_directory)/sign.txt ;\ + fi # Command for running JS and PHP tests. Works for package.json files in the js/ # and root directory. If phpunit is not installed systemwide, a copy is fetched diff --git a/appinfo/info.xml b/appinfo/info.xml index 1b20e38e..2ab572c6 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -14,7 +14,7 @@ - **📱 Devices:** Lost your phone? Check the map! - **〰 Tracks:** Load GPS tracks or past trips. Recording with [PhoneTrack](https://f-droid.org/en/packages/net.eneiluj.nextcloud.phonetrack/) or [OwnTracks](https://owntracks.org) is planned. ]]></description> - <version>0.1.8</version> + <version>0.1.9</version> <licence>agpl</licence> <author mail="eneiluj@posteo.net">Julien Veyssier</author> <author mail="kontakt+github@arne.email">Arne Hamann</author> @@ -33,7 +33,7 @@ <screenshot>https://raw.githubusercontent.com/nextcloud/maps/master/screenshots/screenshot3.png</screenshot> <dependencies> <lib>exif</lib> - <nextcloud min-version="20" max-version="21"/> + <nextcloud min-version="20" max-version="22"/> </dependencies> <repair-steps> <install> |