Skip to content

Bump the github-workflows group with 5 updates #37

Bump the github-workflows group with 5 updates

Bump the github-workflows group with 5 updates #37

name: package-ionic-app
on:
pull_request:
paths:
- .github/workflows/package-ionic-app.yml
workflow_call:
workflow_dispatch:
# Set `concurrency` to prevent this workflow from being run on code that is not up-to-date on a PR (e.g. when making many push quickly on a PR).
# This behavior is only intended for a PR and not for merge commits on the main branch. Having the workflow run on each merge commit can be useful to spot regressions missed by previous checks.
# To distinguish between these cases, we use `head_ref` that is only defined on `pull-request` and fallback to `run_id` (this is a counter, so it's value is unique between workflow call).
concurrency:
group: package-ionic-app-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
# We use the version 18.12 because the version >= 18.13 have some breaking changes on how they format the date.
# That would break our unit test if we don't update them.
node-version: 18.12.0
wasm-pack-version: 0.11.0
permissions:
contents: read
jobs:
webapp:
runs-on: ubuntu-22.04
name: ⚡ Package web app
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # pin v4.1.1
timeout-minutes: 5
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # pin v4.0.0
with:
node-version: ${{ env.node-version }}
timeout-minutes: 2
- name: Install dependencies
run: npm clean-install
working-directory: client
# Install syft
- uses: taiki-e/install-action@d211c4be5a95cbcd52a0870dda7d63a107a58368 # pin v2.21.26
with:
tool: [email protected], wasm-pack@${{ env.wasm-pack-version }}
- name: Build web bindings
run: npm run build:release
working-directory: bindings/web
- name: Build web app
run: npm run web:release
working-directory: client
- name: Generate SBOM
run: syft packages --config=.syft.yaml --output=spdx-json=Parsec-SBOM-Web.spdx.json .
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # pin v3.1.3
with:
name: webapp
path: |
client/dist/
Parsec-SBOM-Web.spdx.json
if-no-files-found: error
electron:
strategy:
fail-fast: false
matrix:
include:
- name: 🐧 Linux
platform: linux
os: ubuntu-20.04
paths: |
client/electron/dist/parsec-v3-alpha_*_*.snap
client/electron/dist/parsec-v3-alpha-*.AppImage
client/electron/dist/latest-linux.yml
- name: 🏁 Windows
platform: windows
os: windows-2022
paths: |
client/electron/dist/parsec-v3-alpha Setup *.exe
client/electron/dist/parsec-v3-alpha Setup *.exe.blockmap
client/electron/dist/latest.yml
- name: 🍎 macOS
platform: macos
os: macos-12
paths: |
client/electron/dist/parsec-v3-alpha-*.dmg
client/electron/dist/parsec-v3-alpha-*.dmg.blockmap
client/electron/dist/latest-mac.yml
name: "${{matrix.name }}: ⚡ Package electron"
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # pin v4.1.1
timeout-minutes: 5
- name: Install dependencies
shell: bash
run: |
npm clean-install
(cd electron && npm clean-install)
(cd ../bindings/electron && npm clean-install)
working-directory: client
timeout-minutes: 10
- name: Build Electron bindings
run: npm run build:release
working-directory: bindings/electron
# MacOS is really slow when build rust
timeout-minutes: 30
- name: Build Electron apps
run: npm run electron:release
working-directory: client
timeout-minutes: 5
# Install syft
- uses: taiki-e/install-action@d211c4be5a95cbcd52a0870dda7d63a107a58368 # pin v2.21.26
with:
tool: [email protected]
- name: Generate SBOM
run: syft packages --config=.syft.yaml --output=spdx-json=Parsec-SBOM-Electron-${{ matrix.platform }}.spdx.json .
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # pin v3.1.3
with:
name: ${{ runner.os }}-${{ runner.arch }}-electron-app
path: |
${{ matrix.paths }}
Parsec-SBOM-Electron-${{ matrix.platform }}.spdx.json
if-no-files-found: error
timeout-minutes: 10