aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2022-10-26 07:15:33 +0530
committerLibravatar Vijay A <vraravam@users.noreply.github.com>2022-10-26 07:15:34 +0530
commitbc980882d05b7eec4135e4a286f6843fa6cc1bd0 (patch)
treeaf3c5d2d8ad417c05e5d579018f94d13667b3ed2 /.github
parentUpgrade 'nodejs' to '16.18.0' (#705) (diff)
downloadferdium-app-bc980882d05b7eec4135e4a286f6843fa6cc1bd0.tar.gz
ferdium-app-bc980882d05b7eec4135e4a286f6843fa6cc1bd0.tar.zst
ferdium-app-bc980882d05b7eec4135e4a286f6843fa6cc1bd0.zip
Switch from 'npm' to 'pnpm' (#704)
Co-authored-by: Markus Hatvan <markus_hatvan@aon.at> Co-authored-by: Nathanaël Houn <contact@nathanaelhoun.fr> Co-authored-by: Balaji Vijayakumar <kuttibalaji.v6@gmail.com> Co-authored-by: André Oliveira <oliveira.andrerodrigues95@gmail.com>
Diffstat (limited to '.github')
-rw-r--r--.github/PULL_REQUEST_TEMPLATE.md6
-rw-r--r--.github/config.yml2
-rw-r--r--.github/workflows/builds.yml49
3 files changed, 25 insertions, 32 deletions
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 566c78584..44abd46f8 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -25,10 +25,12 @@
25 25
26#### Checklist 26#### Checklist
27<!-- Remove items that do not apply. For completed items, change [ ] to [x]. --> 27<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->
28
28- [ ] My pull request is properly named 29- [ ] My pull request is properly named
29- [ ] The changes respect the code style of the project (`npm run prepare-code`) 30- [ ] The changes respect the code style of the project (`pnpm prepare-code`)
30- [ ] `npm test` passes 31- [ ] `pnpm test` passes
31- [ ] I tested/previewed my changes locally 32- [ ] I tested/previewed my changes locally
32 33
33#### Release Notes 34#### Release Notes
35
34<!-- Please add a one-line description for users of Ferdium to read in the release notes, or 'none' if no notes relevant to such users. Examples and help on special cases: https://github.com/electron/clerk/blob/master/README.md#examples --> 36<!-- Please add a one-line description for users of Ferdium to read in the release notes, or 'none' if no notes relevant to such users. Examples and help on special cases: https://github.com/electron/clerk/blob/master/README.md#examples -->
diff --git a/.github/config.yml b/.github/config.yml
index 237e3f570..bc93ac8c8 100644
--- a/.github/config.yml
+++ b/.github/config.yml
@@ -5,7 +5,7 @@ newPRWelcomeComment: |
5 Things that will help get your PR across the finish line: 5 Things that will help get your PR across the finish line:
6 6
7 - Follow the JavaScript [coding style](https://github.com/electron/electron/blob/master/docs/development/coding-style.md) as recommended by the Electron project. 7 - Follow the JavaScript [coding style](https://github.com/electron/electron/blob/master/docs/development/coding-style.md) as recommended by the Electron project.
8 - Run `npm run lint` locally to catch formatting errors earlier. 8 - Run `pnpm lint` locally to catch formatting errors earlier.
9 - Document any user-facing changes you've made by including screenshots and animated GIFs whenever possible. 9 - Document any user-facing changes you've made by including screenshots and animated GIFs whenever possible.
10 10
11 We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. 11 We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.
diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml
index da3fe69d5..6052dab42 100644
--- a/.github/workflows/builds.yml
+++ b/.github/workflows/builds.yml
@@ -51,15 +51,12 @@ jobs:
51 if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }} 51 if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }}
52 with: 52 with:
53 node-version-file: ".nvmrc" 53 node-version-file: ".nvmrc"
54 - name: Install npm
55 if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }}
56 run: npm i -gf "npm@$(node -p 'require("./package.json").engines.npm')" && npm -v
57 - name: Install pnpm 54 - name: Install pnpm
58 if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }} 55 if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }}
59 run: npm i -gf "pnpm@$(node -p 'require("./recipes/package.json").engines.pnpm')" && pnpm -v 56 run: npm i -gf "pnpm@$(node -p 'require("./package.json").engines.pnpm')" && pnpm -v
60 - name: Install node dependencies 57 - name: Install node dependencies
61 if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }} 58 if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }}
62 run: npm i 59 run: pnpm i
63 - id: should_run 60 - id: should_run
64 name: Check whether there are any commits since this run was last triggered and push them and/or set the output 61 name: Check whether there are any commits since this run was last triggered and push them and/or set the output
65 if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }} 62 if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }}
@@ -90,8 +87,8 @@ jobs:
90 echo "GIT_DIRTY=$(git status -s | wc -l)" >> $GITHUB_ENV 87 echo "GIT_DIRTY=$(git status -s | wc -l)" >> $GITHUB_ENV
91 88
92 echo "Run linter, reformatter, rebrander and tests" 89 echo "Run linter, reformatter, rebrander and tests"
93 npm run prepare-code 90 pnpm prepare-code
94 npm run test 91 pnpm test
95 92
96 echo "Commit dependency-updates and linter changes" 93 echo "Commit dependency-updates and linter changes"
97 git commit -am "Update browserslist data updates and linter fixes [skip ci]" --no-verify || true 94 git commit -am "Update browserslist data updates and linter fixes [skip ci]" --no-verify || true
@@ -107,7 +104,7 @@ jobs:
107 # there were other changes coming from the 'develop' branch (or) 104 # there were other changes coming from the 'develop' branch (or)
108 # this is a manual trigger with the key-phrase 105 # this is a manual trigger with the key-phrase
109 git checkout develop 106 git checkout develop
110 npm version -m "%s [skip ci]" prerelease --preid=nightly 107 pnpm version -m "%s [skip ci]" prerelease --preid=nightly
111 git commit --all --amend --no-edit --no-verify 108 git commit --all --amend --no-edit --no-verify
112 git push origin develop --no-verify 109 git push origin develop --no-verify
113 110
@@ -173,22 +170,20 @@ jobs:
173 uses: actions/setup-node@v3 170 uses: actions/setup-node@v3
174 with: 171 with:
175 node-version-file: ".nvmrc" 172 node-version-file: ".nvmrc"
176 - name: Install npm
177 run: npm i -gf "npm@$(node -p 'require("./package.json").engines.npm')" && npm -v
178 - name: Install pnpm 173 - name: Install pnpm
179 run: npm i -gf "pnpm@$(node -p 'require("./recipes/package.json").engines.pnpm')" && pnpm -v 174 run: npm i -gf "pnpm@$(node -p 'require("./package.json").engines.pnpm')" && pnpm -v
180 - name: Install node dependencies 175 - name: Install node dependencies
181 run: npm i 176 run: pnpm i
182 - name: Package recipes 177 - name: Package recipes
183 run: pnpm i && pnpm lint && pnpm reformat-files && pnpm package 178 run: pnpm i && pnpm lint && pnpm reformat-files && pnpm package
184 working-directory: ./recipes 179 working-directory: ./recipes
185 - name: Run linter and tests 180 - name: Run linter and tests
186 run: npm run lint && npm run test 181 run: pnpm lint && pnpm test
187 - name: Build Ferdium without publish for any branch not 'nightly' and not 'release' 182 - name: Build Ferdium without publish for any branch not 'nightly' and not 'release'
188 if: ${{ env.GIT_BRANCH_NAME != 'nightly' && env.GIT_BRANCH_NAME != 'release' }} 183 if: ${{ env.GIT_BRANCH_NAME != 'nightly' && env.GIT_BRANCH_NAME != 'release' }}
189 env: 184 env:
190 CSC_IDENTITY_AUTO_DISCOVERY: false 185 CSC_IDENTITY_AUTO_DISCOVERY: false
191 run: npm run build -- --publish never 186 run: pnpm build --publish never
192 shell: bash 187 shell: bash
193 - name: "Build Ferdium with publish for '${{ env.GIT_BRANCH_NAME }}' branch" 188 - name: "Build Ferdium with publish for '${{ env.GIT_BRANCH_NAME }}' branch"
194 if: ${{ env.GIT_BRANCH_NAME == 'nightly' || env.GIT_BRANCH_NAME == 'release' }} 189 if: ${{ env.GIT_BRANCH_NAME == 'nightly' || env.GIT_BRANCH_NAME == 'release' }}
@@ -199,7 +194,7 @@ jobs:
199 APPLEID_PASSWORD: ${{ secrets.APPLEID_PASSWORD }} 194 APPLEID_PASSWORD: ${{ secrets.APPLEID_PASSWORD }}
200 CSC_LINK: ${{ secrets.CSC_LINK }} 195 CSC_LINK: ${{ secrets.CSC_LINK }}
201 CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} 196 CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
202 run: npm run build -- --publish always 197 run: pnpm build --publish always
203 shell: bash 198 shell: bash
204 199
205 build_linux: 200 build_linux:
@@ -249,12 +244,10 @@ jobs:
249 uses: actions/setup-node@v3 244 uses: actions/setup-node@v3
250 with: 245 with:
251 node-version-file: ".nvmrc" 246 node-version-file: ".nvmrc"
252 - name: Install npm
253 run: npm i -gf "npm@$(node -p 'require("./package.json").engines.npm')" && npm -v
254 - name: Install pnpm 247 - name: Install pnpm
255 run: npm i -gf "pnpm@$(node -p 'require("./recipes/package.json").engines.pnpm')" && pnpm -v 248 run: npm i -gf "pnpm@$(node -p 'require("./package.json").engines.pnpm')" && pnpm -v
256 - name: Install node dependencies 249 - name: Install node dependencies
257 run: npm i 250 run: pnpm i
258 - name: Figure out used package.json version 251 - name: Figure out used package.json version
259 run: | 252 run: |
260 PACKAGE_VERSION="$(node -p 'require("./package.json").version')" 253 PACKAGE_VERSION="$(node -p 'require("./package.json").version')"
@@ -278,12 +271,12 @@ jobs:
278 run: pnpm i && pnpm lint && pnpm reformat-files && pnpm package 271 run: pnpm i && pnpm lint && pnpm reformat-files && pnpm package
279 working-directory: ./recipes 272 working-directory: ./recipes
280 - name: Run linter and tests 273 - name: Run linter and tests
281 run: npm run lint && npm run test 274 run: pnpm lint && pnpm test
282 - name: Build Ferdium without publish for any branch not 'nightly' and not 'release' 275 - name: Build Ferdium without publish for any branch not 'nightly' and not 'release'
283 if: ${{ env.GIT_BRANCH_NAME != 'nightly' && env.GIT_BRANCH_NAME != 'release' }} 276 if: ${{ env.GIT_BRANCH_NAME != 'nightly' && env.GIT_BRANCH_NAME != 'release' }}
284 env: 277 env:
285 CSC_IDENTITY_AUTO_DISCOVERY: false 278 CSC_IDENTITY_AUTO_DISCOVERY: false
286 run: npm run build -- --publish never 279 run: pnpm build --publish never
287 shell: bash 280 shell: bash
288 - name: "Build Ferdium with publish for '${{ env.GIT_BRANCH_NAME }}' branch" 281 - name: "Build Ferdium with publish for '${{ env.GIT_BRANCH_NAME }}' branch"
289 if: ${{ env.GIT_BRANCH_NAME == 'nightly' || env.GIT_BRANCH_NAME == 'release' }} 282 if: ${{ env.GIT_BRANCH_NAME == 'nightly' || env.GIT_BRANCH_NAME == 'release' }}
@@ -294,7 +287,7 @@ jobs:
294 run: | 287 run: |
295 sudo snap install snapcraft --channel=5.x/stable --classic 288 sudo snap install snapcraft --channel=5.x/stable --classic
296 echo "$SNAPCRAFT_LOGIN" | snapcraft login --with - 289 echo "$SNAPCRAFT_LOGIN" | snapcraft login --with -
297 npm run build -- --publish always -c.snap.publish.repo=$SNAP_PUBLISH_REPO -c.snap.publish.channels=$SNAP_PUBLISH_CHANNEL 290 pnpm build --publish always -c.snap.publish.repo=$SNAP_PUBLISH_REPO -c.snap.publish.channels=$SNAP_PUBLISH_CHANNEL
298 snapcraft logout 291 snapcraft logout
299 shell: bash 292 shell: bash
300 293
@@ -347,14 +340,12 @@ jobs:
347 uses: actions/setup-node@v3 340 uses: actions/setup-node@v3
348 with: 341 with:
349 node-version-file: ".nvmrc" 342 node-version-file: ".nvmrc"
350 - name: Install npm
351 run: npm i -gf "npm@$(node -p 'require(\"./package.json\").engines.npm')" && npm -v
352 - name: Install pnpm 343 - name: Install pnpm
353 run: npm i -gf "pnpm@$(node -p 'require(\"./recipes/package.json\").engines.pnpm')" && pnpm -v 344 run: npm i -gf "pnpm@$(node -p 'require(\"./package.json\").engines.pnpm')" && pnpm -v
354 - name: Install node dependencies 345 - name: Install node dependencies
355 uses: nick-invision/retry@v2.4.0 346 uses: nick-invision/retry@v2.4.0
356 with: 347 with:
357 command: npm i 348 command: pnpm i
358 timeout_minutes: 15 349 timeout_minutes: 15
359 max_attempts: 3 350 max_attempts: 3
360 retry_on: error 351 retry_on: error
@@ -363,13 +354,13 @@ jobs:
363 working-directory: ./recipes 354 working-directory: ./recipes
364 shell: bash 355 shell: bash
365 - name: Run linter and tests 356 - name: Run linter and tests
366 run: npm run lint && npm run test 357 run: pnpm lint && pnpm test && pnpm build:windows
367 shell: bash 358 shell: bash
368 - name: Build Ferdium without publish for any branch not 'nightly' and not 'release' 359 - name: Build Ferdium without publish for any branch not 'nightly' and not 'release'
369 if: ${{ env.GIT_BRANCH_NAME != 'nightly' && env.GIT_BRANCH_NAME != 'release' }} 360 if: ${{ env.GIT_BRANCH_NAME != 'nightly' && env.GIT_BRANCH_NAME != 'release' }}
370 env: 361 env:
371 CSC_IDENTITY_AUTO_DISCOVERY: false 362 CSC_IDENTITY_AUTO_DISCOVERY: false
372 run: npm run build -- --publish never 363 run: pnpm electron-builder --publish never
373 shell: bash 364 shell: bash
374 - name: "Build Ferdium with publish for '${{ env.GIT_BRANCH_NAME }}' branch" 365 - name: "Build Ferdium with publish for '${{ env.GIT_BRANCH_NAME }}' branch"
375 if: ${{ env.GIT_BRANCH_NAME == 'nightly' || env.GIT_BRANCH_NAME == 'release' }} 366 if: ${{ env.GIT_BRANCH_NAME == 'nightly' || env.GIT_BRANCH_NAME == 'release' }}
@@ -378,5 +369,5 @@ jobs:
378 CSC_IDENTITY_AUTO_DISCOVERY: true 369 CSC_IDENTITY_AUTO_DISCOVERY: true
379 WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }} 370 WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }}
380 WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }} 371 WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }}
381 run: npm run build -- --publish always 372 run: pnpm electron-builder --publish always
382 shell: bash 373 shell: bash