fix: packages/app-mobile/package.json to reduce vulnerabilities #298
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Xilinota Continuous Integration | |
on: [push, pull_request] | |
jobs: | |
pre_job: | |
if: github.repository == 'XilinJia/xilinota' | |
# Do not use unbuntu-latest because it causes `The operation was canceled` failures: | |
# https://github.com/actions/runner-images/issues/6709 | |
runs-on: ubuntu-20.04 | |
outputs: | |
should_skip: ${{ steps.skip_check.outputs.should_skip }} | |
steps: | |
- id: skip_check | |
uses: fkirc/skip-duplicate-actions@v5 | |
with: | |
concurrent_skipping: 'same_content_newer' | |
Main: | |
needs: pre_job | |
# We always process server or desktop release tags, because they also publish the release | |
if: github.repository == 'XilinJia/xilinota' && (needs.pre_job.outputs.should_skip != 'true' || startsWith(github.ref, 'refs/tags/v')) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# Do not use unbuntu-latest because it causes `The operation was canceled` failures: | |
# https://github.com/actions/runner-images/issues/6709 | |
os: [macos-latest, ubuntu-20.04, windows-2019] | |
# os: [ubuntu-20.04, windows-2019] | |
steps: | |
# Trying to fix random networking issues on Windows | |
# https://github.com/actions/runner-images/issues/1187#issuecomment-686735760 | |
- name: Disable TCP/UDP offload on Windows | |
if: runner.os == 'Windows' | |
run: Disable-NetAdapterChecksumOffload -Name * -TcpIPv4 -UdpIPv4 -TcpIPv6 -UdpIPv6 | |
- name: Disable TCP/UDP offload on Linux | |
if: runner.os == 'Linux' | |
run: sudo ethtool -K eth0 tx off rx off | |
- name: Disable TCP/UDP offload on macOS | |
if: runner.os == 'macOS' | |
run: | | |
sudo sysctl -w net.link.generic.system.hwcksum_tx=0 | |
sudo sysctl -w net.link.generic.system.hwcksum_rx=0 | |
# Silence apt-get update errors (for example when a module doesn't | |
# exist) since otherwise it will make the whole build fails, even though | |
# it might work without update. libsecret-1-dev is required for keytar - | |
# https://github.com/atom/node-keytar | |
- name: Install Linux dependencies | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update || true | |
sudo apt-get install -y gettext | |
sudo apt-get install -y libsecret-1-dev | |
sudo apt-get install -y translate-toolkit | |
sudo apt-get install -y rsync | |
- uses: actions/checkout@v4 | |
- uses: olegtarasov/[email protected] | |
- uses: actions/setup-node@v4 | |
with: | |
# We need to pin the version to 18.15, because 18.16+ fails with this error: | |
# https://github.com/facebook/react-native/issues/36440 | |
node-version: '21.5.0' | |
cache: 'yarn' | |
- name: Install Yarn | |
run: | | |
# https://yarnpkg.com/getting-started/install | |
corepack enable | |
- name: Run tests, build and publish Linux and macOS apps | |
if: runner.os == 'Linux' || runner.os == 'macOs' | |
env: | |
# APPLE_ASC_PROVIDER: ${{ secrets.APPLE_ASC_PROVIDER }} | |
# APPLE_ID: ${{ secrets.APPLE_ID }} | |
# APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} | |
# APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }} | |
# CSC_KEY_PASSWORD: ${{ secrets.APPLE_CSC_KEY_PASSWORD }} | |
# CSC_LINK: ${{ secrets.APPLE_CSC_LINK }} | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
IS_CONTINUOUS_INTEGRATION: 1 | |
BUILD_SEQUENCIAL: 1 | |
run: | | |
"${GITHUB_WORKSPACE}/.github/scripts/run_ci.sh" | |
- name: Build and publish Windows app | |
if: runner.os == 'Windows' && startsWith(github.ref, 'refs/tags/v') | |
env: | |
# CSC_KEY_PASSWORD: ${{ secrets.WINDOWS_CSC_KEY_PASSWORD }} | |
# CSC_LINK: ${{ secrets.WINDOWS_CSC_LINK }} | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
IS_CONTINUOUS_INTEGRATION: 1 | |
BUILD_SEQUENCIAL: 1 | |
# To ensure that the operations stop on failure, all commands | |
# should be on one line with "&&" in between. | |
run: | | |
yarn install && cd packages/app-desktop && yarn run dist | |
# Build and package the Windows app, without publishing it, just to | |
# verify that the build process hasn't been broken. | |
- name: Build Windows app (no publishing) | |
if: runner.os == 'Windows' && !startsWith(github.ref, 'refs/tags/v') | |
env: | |
IS_CONTINUOUS_INTEGRATION: 1 | |
BUILD_SEQUENCIAL: 1 | |
run: | | |
yarn install && cd packages/app-desktop && yarn run dist --publish=never |