From b8151633a48618cbaea39713094efe6fed5427d8 Mon Sep 17 00:00:00 2001 From: Oleksander Piskun Date: Fri, 23 Oct 2026 13:47:27 +0000 Subject: [PATCH] ci: switch to the npm-build workflow and the moved app store action Signed-off-by: Oleksander Piskun --- .github/workflows/appstore-build-publish.yml | 2 +- .github/workflows/{node.yml => npm-build.yml} | 23 +++++++++++-------- 2 files changed, 14 insertions(+), 11 deletions(-) rename .github/workflows/{node.yml => npm-build.yml} (78%) diff --git a/.github/workflows/appstore-build-publish.yml b/.github/workflows/appstore-build-publish.yml index 68add93b..46d95179 100644 --- a/.github/workflows/appstore-build-publish.yml +++ b/.github/workflows/appstore-build-publish.yml @@ -165,7 +165,7 @@ jobs: overwrite: true - name: Upload app to Nextcloud appstore - uses: nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 # v1 + uses: nextcloud-libraries/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 # v1.0.3 with: app_name: ${{ env.APP_NAME }} appstore_token: ${{ secrets.APPSTORE_TOKEN }} diff --git a/.github/workflows/node.yml b/.github/workflows/npm-build.yml similarity index 78% rename from .github/workflows/node.yml rename to .github/workflows/npm-build.yml index 9ff4290a..ecf37a33 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/npm-build.yml @@ -6,7 +6,7 @@ # SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors # SPDX-License-Identifier: MIT -name: Node +name: Build Javascript on: pull_request @@ -59,19 +59,22 @@ jobs: persist-credentials: false - name: Read package.json node and npm engines version - uses: skjnldsv/read-package-engines-version-actions@06d6db44aa62f4609ba070f556ec24bc99fb85cb # v4 + uses: nextcloud-libraries/parse-package-engines-action@39fcc545a815c353dd0a3fd8fd2ef6e59fd02b92 # v0.2.0 id: versions - with: - fallbackNode: '^20' - fallbackNpm: '^10' - - name: Set up node ${{ steps.versions.outputs.nodeVersion }} + - name: Set up node ${{ steps.versions.outputs.node-version }} uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: - node-version: ${{ steps.versions.outputs.nodeVersion }} + node-version: ${{ steps.versions.outputs.node-version }} + + - name: Set up npm ${{ steps.versions.outputs.package-manager-version }} + run: npm i -g 'npm@${{ steps.versions.outputs.package-manager-version }}' - - name: Set up npm ${{ steps.versions.outputs.npmVersion }} - run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}' + - name: Validate package-lock.json # See https://github.com/npm/cli/issues/4460 + run: | + npm i -g npm-package-lock-add-resolved@1.1.4 + npm-package-lock-add-resolved + git --no-pager diff --exit-code - name: Install dependencies & build env: @@ -81,7 +84,7 @@ jobs: npm ci npm run build --if-present - - name: Check webpack build changes + - name: Check build changes run: | bash -c "[[ ! \"`git status --porcelain `\" ]] || (echo 'Please recompile and commit the assets, see the section \"Show changes on failure\" for details' && exit 1)"