Skip to content

Commit

Permalink
Merge pull request #31 from icewind1991/release-0.3.8
Browse files Browse the repository at this point in the history
Release 0.3.8
  • Loading branch information
icewind1991 committed Dec 6, 2023
2 parents 4d4610c + 19fc968 commit 456a3a7
Show file tree
Hide file tree
Showing 14 changed files with 383 additions and 3,780 deletions.
34 changes: 20 additions & 14 deletions .github/workflows/appstore-build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:
release:
types: [published]

env:
PHP_VERSION: 8.0

jobs:
build_and_publish:
runs-on: ubuntu-latest
Expand All @@ -31,7 +28,7 @@ jobs:
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
path: ${{ env.APP_NAME }}

Expand All @@ -43,19 +40,19 @@ jobs:
expression: "//info//dependencies//nextcloud/@min-version"

- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@1bdcee71fa343c46b18dc6aceffb4cd1e35209c6 # v1.2
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
id: versions
# Continue if no package.json
continue-on-error: true
with:
path: ${{ env.APP_NAME }}
fallbackNode: "^16"
fallbackNpm: "^7"
fallbackNode: '^20'
fallbackNpm: '^9'

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
# Skip if no package.json
if: ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v3
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}

Expand All @@ -64,10 +61,16 @@ jobs:
if: ${{ steps.versions.outputs.npmVersion }}
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"

- name: Set up php ${{ env.PHP_VERSION }}
uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2
- name: Get php version
id: php-versions
uses: icewind1991/nextcloud-version-matrix@334a77e02e5684ba9da35933db0d7110356bf3ba # v1.1.0
with:
php-version: ${{ env.PHP_VERSION }}
filename: ${{ env.APP_NAME }}/appinfo/info.xml

- name: Set up php ${{ steps.php-versions.outputs.php-min }}
uses: shivammathur/setup-php@81cd5ae0920b34eef300e1775313071038a53429 # v2
with:
php-version: ${{ steps.php-versions.outputs.php-min }}
coverage: none
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -87,9 +90,11 @@ jobs:
- name: Build ${{ env.APP_NAME }}
# Skip if no package.json
if: ${{ steps.versions.outputs.nodeVersion }}
env:
CYPRESS_INSTALL_BINARY: 0
run: |
cd ${{ env.APP_NAME }}
npm ci --legacy-peer-deps
npm ci
npm run build
- name: Check Krankerl config
Expand Down Expand Up @@ -125,9 +130,10 @@ jobs:
unzip latest-$NCVERSION.zip
- name: Checkout server master fallback
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
if: ${{ steps.server-checkout.outcome != 'success' }}
with:
submodules: true
repository: nextcloud/server
path: nextcloud

Expand All @@ -147,7 +153,7 @@ jobs:
tar -zcvf ${{ env.APP_NAME }}.tar.gz ${{ env.APP_NAME }}
- name: Attach tarball to github release
uses: svenstaro/upload-release-action@133984371c30d34e38222a64855679a414cb7575 # v2
uses: svenstaro/upload-release-action@1beeb572c19a9242f4361f4cee78f8e0d9aec5df # v2
id: attach_to_release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/lint-info-xml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization

name: Lint
name: Lint info.xml

on:
pull_request:
Expand All @@ -13,20 +13,27 @@ on:
- master
- stable*

permissions:
contents: read

concurrency:
group: lint-info-xml-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
xml-linters:
runs-on: ubuntu-latest

name: info.xml lint
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

- name: Download schema
run: wget https://raw.githubusercontent.com/nextcloud/appstore/master/nextcloudappstore/api/v1/release/info.xsd

- name: Lint info.xml
uses: ChristophWurst/xmllint-action@v1
uses: ChristophWurst/xmllint-action@39155a91429af431d65fafc21fa52ba5c4f5cb71 # v1.1
with:
xml-file: ./appinfo/info.xml
xml-schema-file: ./info.xsd
17 changes: 12 additions & 5 deletions .github/workflows/lint-php-cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization

name: Lint
name: Lint php-cs

on: pull_request

Expand All @@ -22,13 +22,20 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Set up php
uses: shivammathur/setup-php@v2
- name: Get php version
id: versions
uses: icewind1991/nextcloud-version-matrix@c2bf575a3516752db5ce2915499d3f694885e2c7 # v1.0.0

- name: Set up php${{ steps.versions.outputs.php-max }}
uses: shivammathur/setup-php@81cd5ae0920b34eef300e1775313071038a53429 # v2
with:
php-version: "8.0"
php-version: ${{ steps.versions.outputs.php-max }}
coverage: none
ini-file: development
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install dependencies
run: composer i
Expand Down
33 changes: 21 additions & 12 deletions .github/workflows/lint-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,50 @@
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization

name: Lint
name: Lint php

on:
pull_request:
push:
branches:
- main
- master
- stable*
on: pull_request

permissions:
contents: read

concurrency:
concurrency:
group: lint-php-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
matrix:
runs-on: ubuntu-latest
outputs:
php-versions: ${{ steps.versions.outputs.php-versions }}
steps:
- name: Checkout app
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Get version matrix
id: versions
uses: icewind1991/nextcloud-version-matrix@111919cfc7b388b7c02cac3c5d53627137adb89f # v1.0.0

php-lint:
runs-on: ubuntu-latest
needs: matrix
strategy:
matrix:
php-versions: ["7.4", "8.0", "8.1"]
php-versions: ${{fromJson(needs.matrix.outputs.php-versions)}}

name: php-lint

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
uses: shivammathur/setup-php@81cd5ae0920b34eef300e1775313071038a53429 # v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none
ini-file: development
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Lint
run: composer run lint
Expand Down
89 changes: 71 additions & 18 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,95 @@

name: Node

on:
pull_request:
push:
branches:
- master
- stable*
on: pull_request

permissions:
contents: read

concurrency:
group: node-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
changes:
runs-on: ubuntu-latest

outputs:
src: ${{ steps.changes.outputs.src}}

steps:
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
id: changes
continue-on-error: true
with:
filters: |
src:
- '.github/workflows/**'
- 'src/**'
- 'appinfo/info.xml'
- 'package.json'
- 'package-lock.json'
- 'tsconfig.json'
- '**.js'
- '**.ts'
- '**.vue'
build:
runs-on: ubuntu-latest

name: node
needs: changes
if: needs.changes.outputs.src != 'false'

name: NPM build
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@v1.1
id: package-engines-versions
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
id: versions
with:
fallbackNode: '^12'
fallbackNpm: '^6'
fallbackNode: '^20'
fallbackNpm: '^9'

- name: Set up node ${{ steps.package-engines-versions.outputs.nodeVersion }}
uses: actions/setup-node@v2
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v3
with:
node-version: ${{ steps.package-engines-versions.outputs.nodeVersion }}
node-version: ${{ steps.versions.outputs.nodeVersion }}

- name: Set up npm ${{ steps.package-engines-versions.outputs.npmVersion }}
run: npm i -g npm@"${{ steps.package-engines-versions.outputs.npmVersion }}"
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"

- name: Install dependencies & build
env:
CYPRESS_INSTALL_BINARY: 0
PUPPETEER_SKIP_DOWNLOAD: true
run: |
npm ci --legacy-peer-deps
npm run build --if-present
- name: Check webpack build changes
run: |
bash -c "[[ ! \"`git status --porcelain `\" ]] || ( echo 'Uncommited changes in webpack build' && git status && exit 1 )"
bash -c "[[ ! \"`git status --porcelain `\" ]] || (echo 'Please recompile and commit the assets, see the section \"Show changes on failure\" for details' && exit 1)"
- name: Show changes on failure
if: failure()
run: |
git status
git --no-pager diff
exit 1 # make it red to grab attention
summary:
permissions:
contents: none
runs-on: ubuntu-latest
needs: [changes, build]

if: always()

# This is the summary, we just avoid to rename it so that branch protection rules still match
name: node

steps:
- name: Summary status
run: if ${{ needs.changes.outputs.src != 'false' && needs.build.result != 'success' }}; then exit 1; fi
Loading

0 comments on commit 456a3a7

Please sign in to comment.