Skip to content

fix(ci): update electron-builder.yml #10

fix(ci): update electron-builder.yml

fix(ci): update electron-builder.yml #10

Workflow file for this run

name: Build MQTTX Desktop packages
on:
pull_request:
# paths:
# - 'apps/desktop/**'
release:
types:
- published
# push:
# tags:
# - v*.*.*
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Check out Git repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18.17'
- name: Install Dependencies
run: npm install
- name: build-linux
if: matrix.os == 'ubuntu-latest'
run: npm run build:linux
- name: build-mac
if: matrix.os == 'macos-latest'
run: npm run build:mac
- name: build-win
if: matrix.os == 'windows-latest'
run: npm run build:win
# - name: release
# uses: softprops/action-gh-release@v1
# with:
# draft: true
# files: |
# dist/*.exe
# dist/*.zip
# dist/*.dmg
# dist/*.AppImage
# dist/*.snap
# dist/*.deb
# dist/*.rpm
# dist/*.tar.gz
# dist/*.yml
# dist/*.blockmap
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# jobs:
# build:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v3
# - name: Set up Node.js
# uses: actions/setup-node@v3
# with:
# node-version: '18.17'
# - name: use pnpm
# uses: pnpm/action-setup@v2
# with:
# version: 8
# - name: Cache pnpm modules
# uses: actions/cache@v3
# with:
# path: ~/.pnpm-store
# key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
# restore-keys: |
# ${{ runner.os }}-pnpm-
# - name: Install dependencies
# run: pnpm install
# - name: Build Win and Linux packages
# run: pnpm run build:win && pnpm run build:linux
# steps:
# - uses: actions/checkout@v3
# - name: build
# run: |
# docker run --rm -i \
# -v ${PWD}:/project \
# electronuserland/builder:18-wine \
# bash -c "yarn && yarn electron:build-linux && yarn electron:build-win"
# - uses: aws-actions/configure-aws-credentials@v2
# if: github.event_name == 'release'
# with:
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
# - name: upload release asset
# if: github.event_name == 'release'
# run: |
# cd dist
# tag=$(echo ${{ github.ref }} | sed -r "s ^refs/heads/|^refs/tags/(.*) \1 g")
# for var in $(ls); do
# $GITHUB_WORKSPACE/.github/workflows/upload_github_release_asset.sh \
# owner=${{ github.repository_owner }} \
# repo=mqttx \
# tag=$tag \
# filename=$var \
# github_api_token=$(echo ${{ secrets.GITHUB_TOKEN }});
# done
# cd ..
# aws s3 cp --recursive dist s3://${{ secrets.AWS_S3_BUCKET }}/MQTTX/$tag/