Skip to content

[pre-commit.ci] pre-commit autoupdate #718

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #718

name: Electron build/release
on:
push:
pull_request:
release:
types:
- created
jobs:
update-version:
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 16
- name: Update package.json with GitHub tag
run: |
version=$(echo ${GITHUB_REF#refs/*/} | sed 's/^v//')
jq --arg version $version '.version = $version' taxonium_electron/package.json > temp.json
mv temp.json taxonium_electron/package.json
- name: Upload package.json as artifact
uses: actions/upload-artifact@v1
with:
name: package
path: taxonium_electron/package.json
build-mac:
needs: update-version
runs-on: macos-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- name: Download updated package.json
uses: actions/download-artifact@v1
with:
name: package
path: taxonium_electron/
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 16
- name: Build Electron app with electron-builder
run: |
cd taxonium_electron
source download.sh
yarn install
yarn make --arch=arm64
yarn make --arch=x64
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: List output
run: |
cd taxonium_electron
cd out/make/
find .
- name: Store artifact
uses: actions/upload-artifact@v3
with:
name: Build
path: taxonium_electron/out/make/Taxonium-*-arm64.dmg
- name: Store artifact 2
uses: actions/upload-artifact@v3
with:
name: Build
path: taxonium_electron/out/make/Taxonium-*-x64.dmg
- uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: taxonium_electron/out/make/Taxonium-*-arm64.dmg
- uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: taxonium_electron/out/make/Taxonium-*-x64.dmg
build-win:
needs: update-version
runs-on: windows-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- name: Download updated package.json
uses: actions/download-artifact@v1
with:
name: package
path: taxonium_electron/
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 16
- name: Build Electron app with electron-builder
run: |
cd taxonium_electron
mkdir binaries
choco install wget --no-progress
wget https://cov2tree.nyc3.cdn.digitaloceanspaces.com/node_binaries/node18.exe -O binaries/node18.exe
yarn install
yarn make --win --arch=x64
- name: List output
run: |
cd taxonium_electron
cd out/make/squirrel.windows/x64
dir
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Store artifact
uses: actions/upload-artifact@v3
with:
name: Build
path: "taxonium_electron/out/make/squirrel.windows/x64/Taxonium-* Setup.exe"
- uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: "taxonium_electron/out/make/squirrel.windows/x64/Taxonium-* Setup.exe"
build-linux:
needs: update-version
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- name: Download updated package.json
uses: actions/download-artifact@v1
with:
name: package
path: taxonium_electron/
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 16
- name: Build Electron app with electron-builder
run: |
cd taxonium_electron
source download.sh
yarn install
yarn make --linux --arch=x64
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: List output
run: |
cd taxonium_electron
cd out/make
find .
- name: Store artifact
uses: actions/upload-artifact@v3
with:
name: Build
path: taxonium_electron/out/make/deb/x64/taxonium_*_amd64.deb
- name: Store artifact
uses: actions/upload-artifact@v3
with:
name: Build
path: taxonium_electron/out/make/rpm/x64/Taxonium-*-1.x86_64.rpm
- uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: taxonium_electron/out/make/rpm/x64/Taxonium-*-1.x86_64.rpm
- uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: taxonium_electron/out/make/deb/x64/taxonium_*_amd64.deb