Skip to content

Workflow file for this run

name: Electron CD
on:
push:
branches:
- release
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
steps:
- name: Context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.63
override: true
components: rustfmt
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: "3.23.x"
- name: Install Protoc
uses: arduino/setup-protoc@v1
- name: Use cmake
run: cmake --version
- name: Use protoc
run: protoc --version
- name: yarn install
run: |
yarn install
- name: Build and Package@Linux
if: contains(matrix.os, 'ubuntu')
run: |
yarn dist:linux
- name: Mac Certificate-Gen
if: contains(matrix.os, 'macos')
env:
p12base64: ${{ secrets.p12cert }}
run: |
echo "$p12base64" | openssl base64 -d -out cert.p12
- name: Mac Certificate-Install
if: contains(matrix.os, 'macos')
uses: apple-actions/import-codesign-certs@v1
with:
p12-filepath: "cert.p12"
p12-password: ${{ secrets.p12certpassword }}
- name: Build and Package@Mac
if: contains(matrix.os, 'macos')
env:
appleId: ${{ secrets.appleId }}
appleIdPassword: ${{ secrets.appleIdPassword }}
run: |
yarn dist:mac
- name: Build and Package@Win
if: contains(matrix.os, 'windows')
run: |
yarn dist:win
- name: Version@Linux@Mac
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')
run: |
./bin/printversion.sh
- name: Version@Win
if: contains(matrix.os, 'windows')
run: |
./bin/printversion.ps1
- name: Name Packages@Linux
if: contains(matrix.os, 'ubuntu')
run: |
mv dist/zecwallet-lite_${{ env.VERSION }}_amd64.deb dist/Zecwallet_Lite_${{ env.VERSION }}_amd64.deb
- name: Upload artifacts-deb
uses: actions/upload-artifact@v3
if: contains(matrix.os, 'ubuntu')
with:
name: ${{ matrix.os }}
path: dist/Zecwallet_Lite_${{ env.VERSION }}_amd64.deb
- name: Upload artifacts-AppImage
uses: actions/upload-artifact@v3
if: contains(matrix.os, 'ubuntu')
with:
name: ${{ matrix.os }}
path: dist/Zecwallet Lite-${{ env.VERSION }}.AppImage
- name: Upload artifacts-dmg
uses: actions/upload-artifact@v3
if: contains(matrix.os, 'macos')
with:
name: ${{ matrix.os }}
path: dist/Zecwallet Lite-${{ env.VERSION }}.dmg
- name: Upload artifacts-zip
uses: actions/upload-artifact@v3
if: contains(matrix.os, 'windows')
with:
name: ${{ matrix.os }}
path: dist/Zecwallet Lite-${{ env.VERSION }}-win.zip
- name: Upload artifacts-msi
uses: actions/upload-artifact@v3
if: contains(matrix.os, 'windows')
with:
name: ${{ matrix.os }}
path: dist/Zecwallet Lite ${{ env.VERSION }}.msi
job_signbinaries:
name: Consolidate and sign binaries
needs: build
runs-on: ubuntu-latest
steps:
- name: Context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Version
run: |
./bin/printversion.sh
- name: Download ubuntu
uses: actions/download-artifact@v1
with:
name: ubuntu-18.04
- name: Download windows
uses: actions/download-artifact@v1
with:
name: windows-latest
- name: Download MacOS
uses: actions/download-artifact@v1
with:
name: macos-latest
- name: Get gpg key
env:
gpgbase64: ${{ secrets.gpgkey }}
run: |
echo "$gpgbase64" | openssl base64 -d -out gpg.key
- name: Import gpg key
run: |
gpg --allow-secret-key-import --import gpg.key
mkdir release
cp windows-latest/* release/
cp ubuntu-18.04/* release/
cp macos-latest/* release/
- name: Sign binaries
env:
APP_VERSION: ${{ env.VERSION }}
run: |
bin/signbinaries.sh
tar -cf artifacts-$APP_VERSION.tar.gz release/signatures*.zip release/Zecwallet*
- name: Upload final artifacts
uses: actions/upload-artifact@v3
with:
name: artifacts
path: artifacts-${{ env.VERSION }}.tar.gz