summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorLibravatar Nathanaël Houn <contact@nathanaelhoun.fr>2022-04-22 11:51:48 +0200
committerLibravatar GitHub <noreply@github.com>2022-04-22 09:51:48 +0000
commit81b4aae66515b6eec2ac98fda50b1a59bffd94e3 (patch)
treee61886514667101ff8169aa09daa375c9853eb35 /.github
parentFix build for snapcraft: command not found (diff)
downloadferdium-app-81b4aae66515b6eec2ac98fda50b1a59bffd94e3.tar.gz
ferdium-app-81b4aae66515b6eec2ac98fda50b1a59bffd94e3.tar.zst
ferdium-app-81b4aae66515b6eec2ac98fda50b1a59bffd94e3.zip
Added build scripts for linux, macos and windows to help new contributors get setup quickly (#21)
Co-authored-by: Vijay A <vraravam@users.noreply.github.com> Co-authored-by: André Oliveira <oliveira.andrerodrigues95@gmail.com>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/builds.yml38
1 files changed, 16 insertions, 22 deletions
diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml
index 914f2fefd..b84729522 100644
--- a/.github/workflows/builds.yml
+++ b/.github/workflows/builds.yml
@@ -23,10 +23,10 @@ on:
23 workflow_dispatch: 23 workflow_dispatch:
24 inputs: 24 inputs:
25 message: 25 message:
26 description: 'Message for build' 26 description: "Message for build"
27 required: true 27 required: true
28 schedule: 28 schedule:
29 - cron: '15 0 * * *' # every night at 12:15 am (to allow for dependency builds to complete) 29 - cron: "15 0 * * *" # every night at 12:15 am (to allow for dependency builds to complete)
30 30
31env: 31env:
32 USE_HARD_LINKS: false 32 USE_HARD_LINKS: false
@@ -35,7 +35,7 @@ env:
35jobs: 35jobs:
36 check_updates: 36 check_updates:
37 runs-on: ubuntu-latest 37 runs-on: ubuntu-latest
38 name: 'Check latest commit: ${{ github.event.inputs.message }}' 38 name: "Check latest commit: ${{ github.event.inputs.message }}"
39 outputs: 39 outputs:
40 should_run: ${{ steps.should_run.outputs.should_run }} 40 should_run: ${{ steps.should_run.outputs.should_run }}
41 steps: 41 steps:
@@ -51,7 +51,7 @@ jobs:
51 uses: actions/setup-node@v3 51 uses: actions/setup-node@v3
52 if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }} 52 if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }}
53 with: 53 with:
54 node-version-file: '.nvmrc' 54 node-version-file: ".nvmrc"
55 - id: should_run 55 - id: should_run
56 name: Check whether there are any commits since this run was last triggered and push them and/or set the output 56 name: Check whether there are any commits since this run was last triggered and push them and/or set the output
57 if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }} 57 if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]')) }}
@@ -93,7 +93,7 @@ jobs:
93 fi 93 fi
94 94
95 build_mac: 95 build_mac:
96 name: 'macos ${{ github.event.inputs.message }}' 96 name: "macos ${{ github.event.inputs.message }}"
97 needs: check_updates 97 needs: check_updates
98 if: ${{ (needs.check_updates.outputs.should_run != 'false') && (github.event_name != 'workflow_dispatch' || (github.event_name == 'workflow_dispatch' && (contains(github.event.inputs.message, '[macOS]') || (!contains(github.event.inputs.message, '[macOS]') && !contains(github.event.inputs.message, '[Linux]') && !contains(github.event.inputs.message, '[Windows]'))))) }} 98 if: ${{ (needs.check_updates.outputs.should_run != 'false') && (github.event_name != 'workflow_dispatch' || (github.event_name == 'workflow_dispatch' && (contains(github.event.inputs.message, '[macOS]') || (!contains(github.event.inputs.message, '[macOS]') && !contains(github.event.inputs.message, '[Linux]') && !contains(github.event.inputs.message, '[Windows]'))))) }}
99 runs-on: macos-latest 99 runs-on: macos-latest
@@ -136,13 +136,11 @@ jobs:
136 - name: Use Node.js specified in the '.nvmrc' file 136 - name: Use Node.js specified in the '.nvmrc' file
137 uses: actions/setup-node@v3 137 uses: actions/setup-node@v3
138 with: 138 with:
139 node-version-file: '.nvmrc' 139 node-version-file: ".nvmrc"
140 - name: Install npm 140 - name: Install npm
141 run: npm i -gf npm@8.7.0 141 run: npm i -gf "npm@$(jq --raw-output .engines.npm ./package.json)" && npm -v
142 - name: Install pnpm 142 - name: Install pnpm
143 uses: pnpm/action-setup@v2.0.1 143 run: npm i -gf "pnpm@$(jq --raw-output .engines.pnpm ./recipes/package.json)" && pnpm -v
144 with:
145 version: 6.32.8
146 - name: Install node dependencies 144 - name: Install node dependencies
147 run: npm i 145 run: npm i
148 - name: Package recipes 146 - name: Package recipes
@@ -180,7 +178,7 @@ jobs:
180 # CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} 178 # CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
181 179
182 build_linux: 180 build_linux:
183 name: 'ubuntu ${{ github.event.inputs.message }}' 181 name: "ubuntu ${{ github.event.inputs.message }}"
184 needs: check_updates 182 needs: check_updates
185 if: ${{ (needs.check_updates.outputs.should_run != 'false') && (github.event_name != 'workflow_dispatch' || (github.event_name == 'workflow_dispatch' && (contains(github.event.inputs.message, '[Linux]') || (!contains(github.event.inputs.message, '[macOS]') && !contains(github.event.inputs.message, '[Linux]') && !contains(github.event.inputs.message, '[Windows]'))))) }} 183 if: ${{ (needs.check_updates.outputs.should_run != 'false') && (github.event_name != 'workflow_dispatch' || (github.event_name == 'workflow_dispatch' && (contains(github.event.inputs.message, '[Linux]') || (!contains(github.event.inputs.message, '[macOS]') && !contains(github.event.inputs.message, '[Linux]') && !contains(github.event.inputs.message, '[Windows]'))))) }}
186 runs-on: ubuntu-20.04 184 runs-on: ubuntu-20.04
@@ -223,13 +221,11 @@ jobs:
223 - name: Use Node.js specified in the '.nvmrc' file 221 - name: Use Node.js specified in the '.nvmrc' file
224 uses: actions/setup-node@v3 222 uses: actions/setup-node@v3
225 with: 223 with:
226 node-version-file: '.nvmrc' 224 node-version-file: ".nvmrc"
227 - name: Install npm 225 - name: Install npm
228 run: npm i -gf npm@8.7.0 226 run: npm i -gf "npm@$(jq --raw-output .engines.npm ./package.json)" && npm -v
229 - name: Install pnpm 227 - name: Install pnpm
230 uses: pnpm/action-setup@v2.0.1 228 run: npm i -gf "pnpm@$(jq --raw-output .engines.pnpm ./recipes/package.json)" && pnpm -v
231 with:
232 version: 6.32.8
233 - name: Install node dependencies 229 - name: Install node dependencies
234 run: npm i 230 run: npm i
235 - name: Figure out used package.json version 231 - name: Figure out used package.json version
@@ -288,7 +284,7 @@ jobs:
288 shell: bash 284 shell: bash
289 285
290 build_windows: 286 build_windows:
291 name: 'windows ${{ github.event.inputs.message }}' 287 name: "windows ${{ github.event.inputs.message }}"
292 needs: check_updates 288 needs: check_updates
293 if: ${{ (needs.check_updates.outputs.should_run != 'false') && (github.event_name != 'workflow_dispatch' || (github.event_name == 'workflow_dispatch' && (contains(github.event.inputs.message, '[Windows]') || (!contains(github.event.inputs.message, '[macOS]') && !contains(github.event.inputs.message, '[Linux]') && !contains(github.event.inputs.message, '[Windows]'))))) }} 289 if: ${{ (needs.check_updates.outputs.should_run != 'false') && (github.event_name != 'workflow_dispatch' || (github.event_name == 'workflow_dispatch' && (contains(github.event.inputs.message, '[Windows]') || (!contains(github.event.inputs.message, '[macOS]') && !contains(github.event.inputs.message, '[Linux]') && !contains(github.event.inputs.message, '[Windows]'))))) }}
294 runs-on: windows-latest 290 runs-on: windows-latest
@@ -315,13 +311,11 @@ jobs:
315 - name: Use Node.js specified in the '.nvmrc' file 311 - name: Use Node.js specified in the '.nvmrc' file
316 uses: actions/setup-node@v3 312 uses: actions/setup-node@v3
317 with: 313 with:
318 node-version-file: '.nvmrc' 314 node-version-file: ".nvmrc"
319 - name: Install npm 315 - name: Install npm
320 run: npm i -gf npm@8.7.0 316 run: npm i -gf "npm@$(jq --raw-output .engines.npm package.json)" && npm -v
321 - name: Install pnpm 317 - name: Install pnpm
322 uses: pnpm/action-setup@v2.0.1 318 run: npm i -gf "pnpm@$(jq --raw-output .engines.pnpm ./recipes/package.json)" && pnpm -v
323 with:
324 version: 6.32.8
325 - name: Install node dependencies 319 - name: Install node dependencies
326 uses: nick-invision/retry@v2.4.0 320 uses: nick-invision/retry@v2.4.0
327 with: 321 with: