Publish to Nextcloud store #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish to Nextcloud store | |
on: | |
workflow_run: | |
workflows: ["Build and Release"] | |
types: | |
- completed | |
env: | |
APP_NAME: cidgravity_gateway | |
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }} | |
APP_PUBLIC_CRT: ${{ secrets.APP_PUBLIC_CRT }} | |
jobs: | |
publish_to_nextcloud_store: | |
environment: release | |
runs-on: ubuntu-latest | |
name: "Release: build, sign and upload the app" | |
strategy: | |
matrix: | |
php-versions: ['8.1'] | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Setup PHP | |
uses: shivammathur/[email protected] | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: gd,zip | |
coverage: none | |
- name: App build | |
run: make | |
- name: Create signed release archive | |
run: make appstore | |
env: | |
app_private_key: ${{ secrets.APP_PRIVATE_KEY }} | |
app_public_crt: ${{ secrets.APP_PUBLIC_CRT }} | |
- name: Upload app tarball to release | |
uses: svenstaro/[email protected] | |
id: attach_to_release | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: build/artifacts/${{ env.APP_NAME }}.tar.gz | |
asset_name: ${{ env.APP_NAME }}.tar.gz | |
tag: ${{ github.ref }} | |
overwrite: true | |
- name: Upload app to Nextcloud appstore | |
uses: R0Wi/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 | |
with: | |
app_name: ${{ env.APP_NAME }} | |
appstore_token: ${{ secrets.APPSTORE_TOKEN }} | |
download_url: ${{ steps.attach_to_release.outputs.browser_download_url }} | |
app_private_key: ${{ secrets.APP_PRIVATE_KEY }} | |
nightly: ${{ github.event.release.prerelease }} | |
- name: Delete crt and key from local storage | |
run: rm -f ~/.nextcloud/certificates/* |