Merge pull request #44 from Beldex-Coin/dev #16
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: Beldex Electron Wallet Build | |
on: | |
push: | |
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 | |
# 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: Download beldexd binaries | |
run: ./download-release-bins.sh | |
env: | |
OS: ${{ runner.os }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
shell: bash | |
working-directory: ./downloads | |
- name: Extract zip binaries | |
if: runner.os == 'Windows' | |
run: unzip latest | |
shell: bash | |
working-directory: ./downloads | |
- name: Extract xz binaries | |
if: runner.os != 'Windows' | |
run: tar -xf latest | |
shell: bash | |
working-directory: ./downloads | |
- name: Move beldexd binaries | |
run: | | |
find ./downloads -type f -name "beldexd*" -exec cp '{}' ./bin \; | |
find ./downloads -type f -name "beldex-wallet-rpc*" -exec cp '{}' ./bin \; | |
shell: bash | |
- name: Verify binaries | |
run: ls ./bin | |
shell: bash | |
- 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 |