Skip to content

0.0.33

0.0.33 #34

Workflow file for this run

name: Deploy app
on:
release:
types: [published]
jobs:
container:
runs-on: ubuntu-latest
container: nextcloud
steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: whereami
- name: Create tar
run: |
cd whereami && make appstore
- name: load app
run: |
cd whereami
tar xzvf ./build/artifacts/appstore/whereami.tar.gz --directory /usr/src/nextcloud/apps/
- name: Generate key
env:
APP_KEY: ${{ secrets.APP_PRIVATE_KEY }}
APP_CRT: ${{ secrets.APP_CERTIFICATE }}
run: |
echo -n "$APP_KEY" > /usr/src/nextcloud/p.key
echo -n "$APP_CRT" > /usr/src/nextcloud/p.crt
- name: sign app
env:
APP_KEY: ${{ secrets.APP_PRIVATE_KEY }}
run: |
cd /usr/src/nextcloud
php occ integrity:sign-app --privateKey=p.key --certificate=p.crt --path=/usr/src/nextcloud/apps/whereami
cd /usr/src/nextcloud/apps
tar cvzf whereami.tar.gz whereami
echo -n "$APP_KEY" > /usr/src/nextcloud/apps/p.key
openssl dgst -sha512 -sign /usr/src/nextcloud/apps/p.key /usr/src/nextcloud/apps/whereami.tar.gz | openssl base64 > /usr/src/nextcloud/apps/shasum.txt
cat ./shasum.txt
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- name: Upload app tarball to release
uses: svenstaro/upload-release-action@v2
id: attach_to_release_app
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: /usr/src/nextcloud/apps/whereami.tar.gz
asset_name: whereami.tar.gz
tag: ${{ steps.get_version.outputs.VERSION }}
overwrite: true
- name: Upload shasum to release
uses: svenstaro/upload-release-action@v2
id: attach_to_release_shasum
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: /usr/src/nextcloud/apps/shasum.txt
asset_name: shasum.${{ steps.get_version.outputs.VERSION }}.txt
tag: ${{ steps.get_version.outputs.VERSION }}
overwrite: true
- name: Sleep for 1 minute
run: sleep 60s
shell: bash
publish:
runs-on: ubuntu-latest
needs: [container]
steps:
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- name: Upload app to Nextcloud appstore
uses: R0Wi/nextcloud-appstore-push-action@v1
with:
app_name: whereami
appstore_token: ${{ secrets.APPSTORE_TOKEN }}
download_url: https://github.com/Adacis/whereami/releases/download/${{ steps.get_version.outputs.VERSION }}/whereami.tar.gz
app_private_key: ${{ secrets.APP_PRIVATE_KEY }}
nightly: false