From 976f0f6436106fc96651c55c2e254f21a642fe15 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Fri, 28 Oct 2022 06:40:25 +0530 Subject: Revert "Switch from 'npm' to 'pnpm' (#704)" --- .github/workflows/builds.yml | 49 ++++++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 20 deletions(-) (limited to '.github/workflows/builds.yml') diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 6052dab42..da3fe69d5 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -51,12 +51,15 @@ jobs: if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }} with: node-version-file: ".nvmrc" + - name: Install npm + if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }} + run: npm i -gf "npm@$(node -p 'require("./package.json").engines.npm')" && npm -v - name: Install pnpm if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }} - run: npm i -gf "pnpm@$(node -p 'require("./package.json").engines.pnpm')" && pnpm -v + run: npm i -gf "pnpm@$(node -p 'require("./recipes/package.json").engines.pnpm')" && pnpm -v - name: Install node dependencies if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }} - run: pnpm i + run: npm i - id: should_run name: Check whether there are any commits since this run was last triggered and push them and/or set the output if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }} @@ -87,8 +90,8 @@ jobs: echo "GIT_DIRTY=$(git status -s | wc -l)" >> $GITHUB_ENV echo "Run linter, reformatter, rebrander and tests" - pnpm prepare-code - pnpm test + npm run prepare-code + npm run test echo "Commit dependency-updates and linter changes" git commit -am "Update browserslist data updates and linter fixes [skip ci]" --no-verify || true @@ -104,7 +107,7 @@ jobs: # there were other changes coming from the 'develop' branch (or) # this is a manual trigger with the key-phrase git checkout develop - pnpm version -m "%s [skip ci]" prerelease --preid=nightly + npm version -m "%s [skip ci]" prerelease --preid=nightly git commit --all --amend --no-edit --no-verify git push origin develop --no-verify @@ -170,20 +173,22 @@ jobs: uses: actions/setup-node@v3 with: node-version-file: ".nvmrc" + - name: Install npm + run: npm i -gf "npm@$(node -p 'require("./package.json").engines.npm')" && npm -v - name: Install pnpm - run: npm i -gf "pnpm@$(node -p 'require("./package.json").engines.pnpm')" && pnpm -v + run: npm i -gf "pnpm@$(node -p 'require("./recipes/package.json").engines.pnpm')" && pnpm -v - name: Install node dependencies - run: pnpm i + run: npm i - name: Package recipes run: pnpm i && pnpm lint && pnpm reformat-files && pnpm package working-directory: ./recipes - name: Run linter and tests - run: pnpm lint && pnpm test + run: npm run lint && npm run test - name: Build Ferdium without publish for any branch not 'nightly' and not 'release' if: ${{ env.GIT_BRANCH_NAME != 'nightly' && env.GIT_BRANCH_NAME != 'release' }} env: CSC_IDENTITY_AUTO_DISCOVERY: false - run: pnpm build --publish never + run: npm run build -- --publish never shell: bash - name: "Build Ferdium with publish for '${{ env.GIT_BRANCH_NAME }}' branch" if: ${{ env.GIT_BRANCH_NAME == 'nightly' || env.GIT_BRANCH_NAME == 'release' }} @@ -194,7 +199,7 @@ jobs: APPLEID_PASSWORD: ${{ secrets.APPLEID_PASSWORD }} CSC_LINK: ${{ secrets.CSC_LINK }} CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} - run: pnpm build --publish always + run: npm run build -- --publish always shell: bash build_linux: @@ -244,10 +249,12 @@ jobs: uses: actions/setup-node@v3 with: node-version-file: ".nvmrc" + - name: Install npm + run: npm i -gf "npm@$(node -p 'require("./package.json").engines.npm')" && npm -v - name: Install pnpm - run: npm i -gf "pnpm@$(node -p 'require("./package.json").engines.pnpm')" && pnpm -v + run: npm i -gf "pnpm@$(node -p 'require("./recipes/package.json").engines.pnpm')" && pnpm -v - name: Install node dependencies - run: pnpm i + run: npm i - name: Figure out used package.json version run: | PACKAGE_VERSION="$(node -p 'require("./package.json").version')" @@ -271,12 +278,12 @@ jobs: run: pnpm i && pnpm lint && pnpm reformat-files && pnpm package working-directory: ./recipes - name: Run linter and tests - run: pnpm lint && pnpm test + run: npm run lint && npm run test - name: Build Ferdium without publish for any branch not 'nightly' and not 'release' if: ${{ env.GIT_BRANCH_NAME != 'nightly' && env.GIT_BRANCH_NAME != 'release' }} env: CSC_IDENTITY_AUTO_DISCOVERY: false - run: pnpm build --publish never + run: npm run build -- --publish never shell: bash - name: "Build Ferdium with publish for '${{ env.GIT_BRANCH_NAME }}' branch" if: ${{ env.GIT_BRANCH_NAME == 'nightly' || env.GIT_BRANCH_NAME == 'release' }} @@ -287,7 +294,7 @@ jobs: run: | sudo snap install snapcraft --channel=5.x/stable --classic echo "$SNAPCRAFT_LOGIN" | snapcraft login --with - - pnpm build --publish always -c.snap.publish.repo=$SNAP_PUBLISH_REPO -c.snap.publish.channels=$SNAP_PUBLISH_CHANNEL + npm run build -- --publish always -c.snap.publish.repo=$SNAP_PUBLISH_REPO -c.snap.publish.channels=$SNAP_PUBLISH_CHANNEL snapcraft logout shell: bash @@ -340,12 +347,14 @@ jobs: uses: actions/setup-node@v3 with: node-version-file: ".nvmrc" + - name: Install npm + run: npm i -gf "npm@$(node -p 'require(\"./package.json\").engines.npm')" && npm -v - name: Install pnpm - run: npm i -gf "pnpm@$(node -p 'require(\"./package.json\").engines.pnpm')" && pnpm -v + run: npm i -gf "pnpm@$(node -p 'require(\"./recipes/package.json\").engines.pnpm')" && pnpm -v - name: Install node dependencies uses: nick-invision/retry@v2.4.0 with: - command: pnpm i + command: npm i timeout_minutes: 15 max_attempts: 3 retry_on: error @@ -354,13 +363,13 @@ jobs: working-directory: ./recipes shell: bash - name: Run linter and tests - run: pnpm lint && pnpm test && pnpm build:windows + run: npm run lint && npm run test shell: bash - name: Build Ferdium without publish for any branch not 'nightly' and not 'release' if: ${{ env.GIT_BRANCH_NAME != 'nightly' && env.GIT_BRANCH_NAME != 'release' }} env: CSC_IDENTITY_AUTO_DISCOVERY: false - run: pnpm electron-builder --publish never + run: npm run build -- --publish never shell: bash - name: "Build Ferdium with publish for '${{ env.GIT_BRANCH_NAME }}' branch" if: ${{ env.GIT_BRANCH_NAME == 'nightly' || env.GIT_BRANCH_NAME == 'release' }} @@ -369,5 +378,5 @@ jobs: CSC_IDENTITY_AUTO_DISCOVERY: true WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }} WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }} - run: pnpm electron-builder --publish always + run: npm run build -- --publish always shell: bash -- cgit v1.2.3-54-g00ecf