Electron CD #10
Workflow file for this run
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: Electron CD | |
on: | |
release: | |
types: | |
- created | |
tags: | |
- "v[0-9]+(\\.[0-9]+)*" | |
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.66 | |
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: Get latest raw release version number | |
id: get_version_raw | |
uses: battila7/get-version-action@v2 | |
- name: Get latest release version number | |
id: get_version | |
uses: bhowell2/github-substring-action@v1 | |
with: | |
output_name: version | |
value: ${{ steps.get_version_raw.outputs.version }} | |
index_of_str: "v" | |
- name: Install linux deps | |
if: contains(matrix.os, 'ubuntu') | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libudev-dev | |
- 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: Name Packages@Linux | |
if: contains(matrix.os, 'ubuntu') | |
run: | | |
mv dist/zecwallet-lite_${{ steps.get_version.outputs.version }}_amd64.deb dist/Zecwallet_Lite_${{ steps.get_version.outputs.version }}_amd64.deb | |
- name: Update release-deb | |
if: contains(matrix.os, 'ubuntu') | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
with: | |
files: | | |
dist/Zecwallet_Lite_${{ steps.get_version.outputs.version }}_amd64.deb | |
draft: false | |
prerelease: false | |
- name: Update release-AppImage | |
if: contains(matrix.os, 'ubuntu') | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
with: | |
files: | | |
dist/Zecwallet Lite-${{ steps.get_version.outputs.version }}.AppImage | |
draft: false | |
prerelease: false | |
- name: Update release-dmg | |
if: contains(matrix.os, 'macos') | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
with: | |
files: | | |
dist/Zecwallet Lite-${{ steps.get_version.outputs.version }}.dmg | |
draft: false | |
prerelease: false | |
- name: Update release-zip | |
if: contains(matrix.os, 'windows') | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
with: | |
files: | | |
dist/Zecwallet Lite-${{ steps.get_version.outputs.version }}-win.zip | |
draft: false | |
prerelease: false | |
- name: Update release-msi | |
if: contains(matrix.os, 'windows') | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
with: | |
files: | | |
dist/Zecwallet Lite-${{ steps.get_version.outputs.version }}.msi | |
draft: false | |
prerelease: false |