oxen-electron-gui-wallet/.github/workflows/build.yml

90 lines
2.6 KiB
YAML

name: Oxen Electron Wallet Build
on:
push:
branches:
- master
- development
pull_request:
# The branches below must be a subset of the branches above
branches:
- master
- development
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
steps:
- name: Checkout git repo
uses: actions/checkout@v1
- name: Download macos oxend binaries
if: runner.os == 'macOS'
run: tools/download-oxen-files.sh https://oxen.rocks/oxen-io/oxen-core/oxen-stable-macos-LATEST.tar.xz
env:
OS: ${{ runner.os }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
- name: Download windows oxend binaries
if: runner.os == 'Windows'
run: tools/download-oxen-files.sh https://oxen.rocks/oxen-io/oxen-core/oxen-stable-windows-LATEST.zip
env:
OS: ${{ runner.os }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
- name: Download linux oxend binaries
if: runner.os == 'Linux'
run: tools/download-oxen-files.sh https://oxen.rocks/oxen-io/oxen-core/oxen-stable-linux-LATEST.tar.xz
env:
OS: ${{ runner.os }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
# Read node version from `.nvmrc` file
- name: Read nvm rc
id: nvmrc
uses: browniebroke/read-nvmrc-action@v1
- name: Install node
uses: actions/setup-node@v1
with:
node-version: ${{ steps.nvmrc.outputs.node_version }}
- name: Install dependencies
run: npm install
- name: Build window and linux binaries
if: runner.os != 'macOS'
run: npm run build
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build mac binaries
if: runner.os == 'macOS'
run: npm run build
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CSC_LINK: ${{ secrets.MAC_CERTIFICATE }}
CSC_KEY_PASSWORD: ${{ secrets.MAC_CERTIFICATE_PASSWORD }}
SIGNING_APPLE_ID: ${{ secrets.SIGNING_APPLE_ID }}
SIGNING_APP_PASSWORD: ${{ secrets.SIGNING_APP_PASSWORD }}
SIGNING_TEAM_ID: ${{ secrets.SIGNING_TEAM_ID }}
- name: Remove un-needed artifacts
run: rm -r -- ./*/
shell: bash
working-directory: ./dist/electron/Packaged
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: ${{ runner.OS }}
path: dist/electron/Packaged