Skip to content

chore: update build tools and remove patches #520

chore: update build tools and remove patches

chore: update build tools and remove patches #520

Workflow file for this run

name: Build/release
on:
workflow_dispatch:
push:
permissions: {}
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y yasm libudev-dev libusb-1.0-0-dev
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.node-version'
- name: Prepare
run: |
corepack enable
# try and avoid timeout errors
yarn config set httpTimeout 100000
yarn
- name: Lint
run: |
yarn lint
Windows-x64:
runs-on: ['self-hosted', 'Windows', 'codecert', 'X64']
steps:
- name: Check out Git repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.node-version'
- name: Determine files to upload
id: filenames
shell: bash
run: |
HASH=$(git rev-parse --short HEAD)
COUNT=$(git rev-list --count HEAD)
VERSION=$(node -e "console.log(require('./package.json').version)")
echo "sourcename=electron-output/companion-satellite-x64.exe" >> $GITHUB_OUTPUT
echo "targetname=companion-satellite-x64-${COUNT}-${HASH}.exe" >> $GITHUB_OUTPUT
echo "longversion=${VERSION}-${COUNT}+${HASH}" >> $GITHUB_OUTPUT
- name: Run build
shell: bash
run: |
corepack enable
# try and avoid timeout errors
yarn config set httpTimeout 100000
yarn
yarn --cwd webui install
- name: build & package (unsigned)
if: ${{ runner.environment != 'self-hosted' }}
shell: bash
run: |
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
export EB_UPDATE_CHANNEL=stable
elif [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
export EB_UPDATE_CHANNEL=beta
export BUILD_VERSION=${{ steps.filenames.outputs.longversion }}
elif [[ "${{ github.ref }}" == "refs/heads/develop" ]]; then
export EB_UPDATE_CHANNEL=experimental
export BUILD_VERSION=${{ steps.filenames.outputs.longversion }}
fi
yarn dist win32-x64
env:
CI: 1
- name: build & package (signed)
if: ${{ runner.environment == 'self-hosted' }}
shell: bash
run: |
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
export EB_UPDATE_CHANNEL=stable
elif [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
export EB_UPDATE_CHANNEL=beta
export BUILD_VERSION=${{ steps.filenames.outputs.longversion }}
elif [[ "${{ github.ref }}" == "refs/heads/develop" ]]; then
export EB_UPDATE_CHANNEL=experimental
export BUILD_VERSION=${{ steps.filenames.outputs.longversion }}
fi
yarn dist win32-x64
env:
CI: 1
CSC_LINK: c:\\actions-runner-bitfocusas\\codesign.cer
BF_CODECERT_KEY: ${{ secrets.BF_CODECERT_KEY }}
- name: Upload build
uses: bitfocus/actions/upload-and-notify@main
with:
long-version: ${{ steps.filenames.outputs.longversion }}
beta-branch: main
source-filename: ${{ steps.filenames.outputs.sourcename }}
destination-filename: ${{ steps.filenames.outputs.targetname }}
s3-host: ${{ secrets.S3_HOST }}
s3-bucket: ${{ secrets.S3_BUCKET }}/companion-satellite
s3-access-key: ${{ secrets.S3_KEY }}
s3-secret-key: ${{ secrets.S3_SECRET }}
api-product: companion-satellite
api-target: 'win-x64'
api-secret: ${{ secrets.BITFOCUS_API_PROJECT_SECRET }}
- name: Upload as artifact
uses: actions/upload-artifact@v4
with:
name: windows-x64
path: ${{ steps.filenames.outputs.sourcename }}
retention-days: 1