diff options
Diffstat (limited to '.github/workflows/builds.yml')
-rw-r--r-- | .github/workflows/builds.yml | 49 |
1 files changed, 29 insertions, 20 deletions
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: | |||
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 | ||
54 | - name: Install pnpm | 57 | - name: Install pnpm |
55 | 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]')) }} |
56 | run: npm i -gf "pnpm@$(node -p 'require("./package.json").engines.pnpm')" && pnpm -v | 59 | run: npm i -gf "pnpm@$(node -p 'require("./recipes/package.json").engines.pnpm')" && pnpm -v |
57 | - name: Install node dependencies | 60 | - name: Install node dependencies |
58 | if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }} | 61 | if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }} |
59 | run: pnpm i | 62 | run: npm i |
60 | - id: should_run | 63 | - id: should_run |
61 | name: Check whether there are any commits since this run was last triggered and push them and/or set the output | 64 | name: Check whether there are any commits since this run was last triggered and push them and/or set the output |
62 | if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }} | 65 | if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }} |
@@ -87,8 +90,8 @@ jobs: | |||
87 | echo "GIT_DIRTY=$(git status -s | wc -l)" >> $GITHUB_ENV | 90 | echo "GIT_DIRTY=$(git status -s | wc -l)" >> $GITHUB_ENV |
88 | 91 | ||
89 | echo "Run linter, reformatter, rebrander and tests" | 92 | echo "Run linter, reformatter, rebrander and tests" |
90 | pnpm prepare-code | 93 | npm run prepare-code |
91 | pnpm test | 94 | npm run test |
92 | 95 | ||
93 | echo "Commit dependency-updates and linter changes" | 96 | echo "Commit dependency-updates and linter changes" |
94 | git commit -am "Update browserslist data updates and linter fixes [skip ci]" --no-verify || true | 97 | git commit -am "Update browserslist data updates and linter fixes [skip ci]" --no-verify || true |
@@ -104,7 +107,7 @@ jobs: | |||
104 | # there were other changes coming from the 'develop' branch (or) | 107 | # there were other changes coming from the 'develop' branch (or) |
105 | # this is a manual trigger with the key-phrase | 108 | # this is a manual trigger with the key-phrase |
106 | git checkout develop | 109 | git checkout develop |
107 | pnpm version -m "%s [skip ci]" prerelease --preid=nightly | 110 | npm version -m "%s [skip ci]" prerelease --preid=nightly |
108 | git commit --all --amend --no-edit --no-verify | 111 | git commit --all --amend --no-edit --no-verify |
109 | git push origin develop --no-verify | 112 | git push origin develop --no-verify |
110 | 113 | ||
@@ -170,20 +173,22 @@ jobs: | |||
170 | uses: actions/setup-node@v3 | 173 | uses: actions/setup-node@v3 |
171 | with: | 174 | with: |
172 | node-version-file: ".nvmrc" | 175 | node-version-file: ".nvmrc" |
176 | - name: Install npm | ||
177 | run: npm i -gf "npm@$(node -p 'require("./package.json").engines.npm')" && npm -v | ||
173 | - name: Install pnpm | 178 | - name: Install pnpm |
174 | run: npm i -gf "pnpm@$(node -p 'require("./package.json").engines.pnpm')" && pnpm -v | 179 | run: npm i -gf "pnpm@$(node -p 'require("./recipes/package.json").engines.pnpm')" && pnpm -v |
175 | - name: Install node dependencies | 180 | - name: Install node dependencies |
176 | run: pnpm i | 181 | run: npm i |
177 | - name: Package recipes | 182 | - name: Package recipes |
178 | run: pnpm i && pnpm lint && pnpm reformat-files && pnpm package | 183 | run: pnpm i && pnpm lint && pnpm reformat-files && pnpm package |
179 | working-directory: ./recipes | 184 | working-directory: ./recipes |
180 | - name: Run linter and tests | 185 | - name: Run linter and tests |
181 | run: pnpm lint && pnpm test | 186 | run: npm run lint && npm run test |
182 | - name: Build Ferdium without publish for any branch not 'nightly' and not 'release' | 187 | - name: Build Ferdium without publish for any branch not 'nightly' and not 'release' |
183 | if: ${{ env.GIT_BRANCH_NAME != 'nightly' && env.GIT_BRANCH_NAME != 'release' }} | 188 | if: ${{ env.GIT_BRANCH_NAME != 'nightly' && env.GIT_BRANCH_NAME != 'release' }} |
184 | env: | 189 | env: |
185 | CSC_IDENTITY_AUTO_DISCOVERY: false | 190 | CSC_IDENTITY_AUTO_DISCOVERY: false |
186 | run: pnpm build --publish never | 191 | run: npm run build -- --publish never |
187 | shell: bash | 192 | shell: bash |
188 | - name: "Build Ferdium with publish for '${{ env.GIT_BRANCH_NAME }}' branch" | 193 | - name: "Build Ferdium with publish for '${{ env.GIT_BRANCH_NAME }}' branch" |
189 | if: ${{ env.GIT_BRANCH_NAME == 'nightly' || env.GIT_BRANCH_NAME == 'release' }} | 194 | if: ${{ env.GIT_BRANCH_NAME == 'nightly' || env.GIT_BRANCH_NAME == 'release' }} |
@@ -194,7 +199,7 @@ jobs: | |||
194 | APPLEID_PASSWORD: ${{ secrets.APPLEID_PASSWORD }} | 199 | APPLEID_PASSWORD: ${{ secrets.APPLEID_PASSWORD }} |
195 | CSC_LINK: ${{ secrets.CSC_LINK }} | 200 | CSC_LINK: ${{ secrets.CSC_LINK }} |
196 | CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} | 201 | CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} |
197 | run: pnpm build --publish always | 202 | run: npm run build -- --publish always |
198 | shell: bash | 203 | shell: bash |
199 | 204 | ||
200 | build_linux: | 205 | build_linux: |
@@ -244,10 +249,12 @@ jobs: | |||
244 | uses: actions/setup-node@v3 | 249 | uses: actions/setup-node@v3 |
245 | with: | 250 | with: |
246 | node-version-file: ".nvmrc" | 251 | node-version-file: ".nvmrc" |
252 | - name: Install npm | ||
253 | run: npm i -gf "npm@$(node -p 'require("./package.json").engines.npm')" && npm -v | ||
247 | - name: Install pnpm | 254 | - name: Install pnpm |
248 | run: npm i -gf "pnpm@$(node -p 'require("./package.json").engines.pnpm')" && pnpm -v | 255 | run: npm i -gf "pnpm@$(node -p 'require("./recipes/package.json").engines.pnpm')" && pnpm -v |
249 | - name: Install node dependencies | 256 | - name: Install node dependencies |
250 | run: pnpm i | 257 | run: npm i |
251 | - name: Figure out used package.json version | 258 | - name: Figure out used package.json version |
252 | run: | | 259 | run: | |
253 | PACKAGE_VERSION="$(node -p 'require("./package.json").version')" | 260 | PACKAGE_VERSION="$(node -p 'require("./package.json").version')" |
@@ -271,12 +278,12 @@ jobs: | |||
271 | run: pnpm i && pnpm lint && pnpm reformat-files && pnpm package | 278 | run: pnpm i && pnpm lint && pnpm reformat-files && pnpm package |
272 | working-directory: ./recipes | 279 | working-directory: ./recipes |
273 | - name: Run linter and tests | 280 | - name: Run linter and tests |
274 | run: pnpm lint && pnpm test | 281 | run: npm run lint && npm run test |
275 | - name: Build Ferdium without publish for any branch not 'nightly' and not 'release' | 282 | - name: Build Ferdium without publish for any branch not 'nightly' and not 'release' |
276 | if: ${{ env.GIT_BRANCH_NAME != 'nightly' && env.GIT_BRANCH_NAME != 'release' }} | 283 | if: ${{ env.GIT_BRANCH_NAME != 'nightly' && env.GIT_BRANCH_NAME != 'release' }} |
277 | env: | 284 | env: |
278 | CSC_IDENTITY_AUTO_DISCOVERY: false | 285 | CSC_IDENTITY_AUTO_DISCOVERY: false |
279 | run: pnpm build --publish never | 286 | run: npm run build -- --publish never |
280 | shell: bash | 287 | shell: bash |
281 | - name: "Build Ferdium with publish for '${{ env.GIT_BRANCH_NAME }}' branch" | 288 | - name: "Build Ferdium with publish for '${{ env.GIT_BRANCH_NAME }}' branch" |
282 | if: ${{ env.GIT_BRANCH_NAME == 'nightly' || env.GIT_BRANCH_NAME == 'release' }} | 289 | if: ${{ env.GIT_BRANCH_NAME == 'nightly' || env.GIT_BRANCH_NAME == 'release' }} |
@@ -287,7 +294,7 @@ jobs: | |||
287 | run: | | 294 | run: | |
288 | sudo snap install snapcraft --channel=5.x/stable --classic | 295 | sudo snap install snapcraft --channel=5.x/stable --classic |
289 | echo "$SNAPCRAFT_LOGIN" | snapcraft login --with - | 296 | echo "$SNAPCRAFT_LOGIN" | snapcraft login --with - |
290 | pnpm build --publish always -c.snap.publish.repo=$SNAP_PUBLISH_REPO -c.snap.publish.channels=$SNAP_PUBLISH_CHANNEL | 297 | npm run build -- --publish always -c.snap.publish.repo=$SNAP_PUBLISH_REPO -c.snap.publish.channels=$SNAP_PUBLISH_CHANNEL |
291 | snapcraft logout | 298 | snapcraft logout |
292 | shell: bash | 299 | shell: bash |
293 | 300 | ||
@@ -340,12 +347,14 @@ jobs: | |||
340 | uses: actions/setup-node@v3 | 347 | uses: actions/setup-node@v3 |
341 | with: | 348 | with: |
342 | node-version-file: ".nvmrc" | 349 | node-version-file: ".nvmrc" |
350 | - name: Install npm | ||
351 | run: npm i -gf "npm@$(node -p 'require(\"./package.json\").engines.npm')" && npm -v | ||
343 | - name: Install pnpm | 352 | - name: Install pnpm |
344 | run: npm i -gf "pnpm@$(node -p 'require(\"./package.json\").engines.pnpm')" && pnpm -v | 353 | run: npm i -gf "pnpm@$(node -p 'require(\"./recipes/package.json\").engines.pnpm')" && pnpm -v |
345 | - name: Install node dependencies | 354 | - name: Install node dependencies |
346 | uses: nick-invision/retry@v2.4.0 | 355 | uses: nick-invision/retry@v2.4.0 |
347 | with: | 356 | with: |
348 | command: pnpm i | 357 | command: npm i |
349 | timeout_minutes: 15 | 358 | timeout_minutes: 15 |
350 | max_attempts: 3 | 359 | max_attempts: 3 |
351 | retry_on: error | 360 | retry_on: error |
@@ -354,13 +363,13 @@ jobs: | |||
354 | working-directory: ./recipes | 363 | working-directory: ./recipes |
355 | shell: bash | 364 | shell: bash |
356 | - name: Run linter and tests | 365 | - name: Run linter and tests |
357 | run: pnpm lint && pnpm test && pnpm build:windows | 366 | run: npm run lint && npm run test |
358 | shell: bash | 367 | shell: bash |
359 | - name: Build Ferdium without publish for any branch not 'nightly' and not 'release' | 368 | - name: Build Ferdium without publish for any branch not 'nightly' and not 'release' |
360 | if: ${{ env.GIT_BRANCH_NAME != 'nightly' && env.GIT_BRANCH_NAME != 'release' }} | 369 | if: ${{ env.GIT_BRANCH_NAME != 'nightly' && env.GIT_BRANCH_NAME != 'release' }} |
361 | env: | 370 | env: |
362 | CSC_IDENTITY_AUTO_DISCOVERY: false | 371 | CSC_IDENTITY_AUTO_DISCOVERY: false |
363 | run: pnpm electron-builder --publish never | 372 | run: npm run build -- --publish never |
364 | shell: bash | 373 | shell: bash |
365 | - name: "Build Ferdium with publish for '${{ env.GIT_BRANCH_NAME }}' branch" | 374 | - name: "Build Ferdium with publish for '${{ env.GIT_BRANCH_NAME }}' branch" |
366 | if: ${{ env.GIT_BRANCH_NAME == 'nightly' || env.GIT_BRANCH_NAME == 'release' }} | 375 | if: ${{ env.GIT_BRANCH_NAME == 'nightly' || env.GIT_BRANCH_NAME == 'release' }} |
@@ -369,5 +378,5 @@ jobs: | |||
369 | CSC_IDENTITY_AUTO_DISCOVERY: true | 378 | CSC_IDENTITY_AUTO_DISCOVERY: true |
370 | WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }} | 379 | WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }} |
371 | WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }} | 380 | WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }} |
372 | run: pnpm electron-builder --publish always | 381 | run: npm run build -- --publish always |
373 | shell: bash | 382 | shell: bash |