Skip to content

tidy up logs and reduce poll interval for metrics #114

tidy up logs and reduce poll interval for metrics

tidy up logs and reduce poll interval for metrics #114

Workflow file for this run

name: Build
on:
push:
branches: [main]
tags: ['*']
pull_request:
branches: [main]
env:
DAEMONROOT: webmesh
WEBMESH_VERSION: v0.17.0
WEBMESHD_BUILD_ARGS: --clean --id webmeshd
GH_TOKEN: ${{ github.token }}
VERSION: ${{ startswith(github.ref, 'refs/tags/') && github.ref_name || '' }}
SIGN: ${{ vars.SIGN }}
WINDOWS_SIGNER_NAME: ${{ vars.WINDOWS_SIGNER_NAME }}
jobs:
build:
name: Build Package
strategy:
fail-fast: false
matrix:
target: [linux, mac, win]
include:
- target: linux
runner: ${{ vars.LINUX_BUILD_PLATFORM }}
artifact-regex: dist/electron/Packaged/*.AppImage
- target: mac
runner: ${{ vars.MACOS_BUILD_PLATFORM }}
artifact-regex: build/Webmesh-*.pkg
- target: win
runner: ${{ vars.WINDOWS_BUILD_PLATFORM }}
artifact-regex: build/**/*.msi
runs-on: ${{ matrix.runner }}
permissions:
contents: 'write'
id-token: 'write'
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout Webmesh
uses: actions/checkout@v4
with:
repository: webmeshproj/webmesh
ref: ${{ env.WEBMESH_VERSION }}
path: ${{ env.DAEMONROOT }}
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: stable
check-latest: true
cache: ${{ !startswith(matrix.runner, 'self-hosted') && matrix.target != 'mac' }}
cache-dependency-path: ${{ env.DAEMONROOT }}/go.sum
- name: Setup Node
uses: actions/setup-node@v3
with:
check-latest: true
node-version-file: .nvmrc
- name: Build Webmesh Helper Daemon
if: ${{ matrix.target != 'linux' && github.event_name != 'pull_request' }}
uses: goreleaser/goreleaser-action@v5
with:
version: latest
workdir: ${{ env.DAEMONROOT }}
args: build ${{ env.WEBMESHD_BUILD_ARGS }}
- name: Build Electron App
run: yarn && yarn build:${{ matrix.target }}
- name: Package App Installer
if: ${{ github.event_name != 'pull_request' }}
run: yarn package:${{ matrix.target }}
- name: Publish Release
uses: softprops/action-gh-release@v1
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
fail_on_unmatched_files: false
files: ${{ matrix.artifact-regex }}