summaryrefslogtreecommitdiffstats
path: root/.github/workflows
diff options
context:
space:
mode:
authorNextcloud bot <bot@nextcloud.com>2021-11-10 20:37:05 +0000
committerNextcloud bot <bot@nextcloud.com>2021-11-10 20:37:05 +0000
commitb9ce77f4729e2edef6a0c37ba1d69ff8daad5fea (patch)
tree47910bba41c215ebcf6e858f3b55b38127129f22 /.github/workflows
parent6df17610677b46c2610b615bf0afd6b3f771d7e8 (diff)
Updating appstore-build-publish.yml workflow from template
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/appstore-build-publish.yml26
1 files changed, 26 insertions, 0 deletions
diff --git a/.github/workflows/appstore-build-publish.yml b/.github/workflows/appstore-build-publish.yml
index ffc9e6e3..a7f7ec6f 100644
--- a/.github/workflows/appstore-build-publish.yml
+++ b/.github/workflows/appstore-build-publish.yml
@@ -46,6 +46,7 @@ jobs:
- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@v1.1
id: versions
+ # Continue if no package.json
continue-on-error: true
with:
path: ${{ env.APP_NAME }}
@@ -53,12 +54,14 @@ jobs:
fallbackNpm: '^6'
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
+ # Skip if no package.json
if: ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@v2
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
+ # Skip if no package.json
if: ${{ steps.versions.outputs.npmVersion }}
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
@@ -68,7 +71,20 @@ jobs:
php-version: ${{ env.PHP_VERSION }}
coverage: none
+ - name: Check composer.json
+ id: check_composer
+ uses: andstor/file-existence-action@v1
+ with:
+ files: "${{ env.APP_NAME }}/composer.json"
+
+ - name: Install composer dependencies
+ if: steps.check_composer.outputs.files_exists == 'true'
+ run: |
+ cd ${{ env.APP_NAME }}
+ composer install --no-dev
+
- name: Build ${{ env.APP_NAME }}
+ # Skip if no package.json
if: ${{ steps.versions.outputs.nodeVersion }}
run: |
cd ${{ env.APP_NAME }}
@@ -76,16 +92,26 @@ jobs:
npm run build
- name: Package ${{ env.APP_NAME }} ${{ env.APP_VERSION }}
+ # Try krankerl, fallback to makefile
run: |
cd ${{ env.APP_NAME }}
krankerl package || make appstore
- name: Checkout server ${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}
+ continue-on-error: true
+ id: server-checkout
run: |
NCVERSION=${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}
wget --quiet https://download.nextcloud.com/server/releases/latest-$NCVERSION.zip
unzip latest-$NCVERSION.zip
+ - name: Checkout server master fallback
+ uses: actions/checkout@v2
+ if: ${{ steps.server-checkout.outcome != 'success' }}
+ with:
+ repository: nextcloud/server
+ path: nextcloud
+
- name: Sign app
run: |
# Extracting release