Skip to content

Ej/background map selection #1565

Ej/background map selection

Ej/background map selection #1565

Workflow file for this run

name: Node CD
on:
push:
tags:
- '*'
branches:
- master
pull_request:
jobs:
build:
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
- { os: macos-11, arch: x64 }
- { os: ubuntu-latest, arch: x64 }
- { os: windows-2019, arch: x64 }
- { os: windows-2019, arch: ia32 }
variant:
- main
- icca
steps:
- name: Context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Use Node.js 16
uses: actions/setup-node@v2
with:
node-version: 16.17.X
- name: npm ci no scripts
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 5
retry_on: error
retry_wait_seconds: 0
command: npm ci --ignore-scripts
env:
npm_config_arch: ${{matrix.config.arch}}
- name: Remove native deps
run: |
npm run remove-native-deps
- name: post install script
run: |
npm run postinstall
- name: Lint
run: |
npm run lint
- name: Build frontend
run: |
npm run build
env:
CI: true
- name: Publish
# Currently undocumented, but if it is None or Dependabot (e.g. PR from a fork) then secrets are not defined
if: github.secret_source == 'Actions'
run: |
npm run dist -- --${{matrix.config.arch}}
env:
ARCH: ${{matrix.config.arch}}
DEBUG: electron-builder
CI: true
GITHUB_CI_REF: ${{ github.ref }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
CSC_LINK: ${{ secrets.CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }}
WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
MAPEO_VARIANT: ${{ matrix.variant }}
- name: Publish (unsigned)
# Currently undocumented, but if it is None (e.g. PR from a fork) then secrets are not defined
if: github.secret_source != 'Actions'
run: |
npm run dist -- --${{matrix.config.arch}}
env:
ARCH: ${{matrix.config.arch}}
CI: true
MAPEO_VARIANT: ${{ matrix.variant }}
- name: Cleanup artifacts
run: |
npm run remove-ci-artifacts -- ${{ matrix.variant }}
shell: bash
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: '${{ matrix.config.os }}-${{ matrix.config.arch }}-${{ matrix.variant }}'
path: dist/${{ matrix.variant }}