Files
2026-07-13 12:46:20 +08:00

56 lines
1.8 KiB
YAML

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: win-appx
on:
push:
branches: [ build, test, build-only, win-appx ]
jobs:
build:
runs-on: windows-2022
environment: build
if: ${{ !contains(github.event.head_commit.message, '[skip build]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip win]') && !contains(github.event.head_commit.message, '[skip appx]') }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js 24.x
uses: actions/setup-node@v4
with:
node-version: 24.x
- uses: actions/setup-python@v5
with:
python-version: '3.7' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- run: npm config set legacy-peer-deps true
- run: npm install -g node-gyp
# before_install:
# - run: npm install --global --production windows-build-tools --vs2015
- run: npm install -g yarn
- run: npm un node-pty serialport
- run: npm i
- run: npm i -S -E node-pty@1.1.0-beta14
- run: npm i -S -E serialport@13.0.0
- name: Install R2 dependencies if store upload may run
if: ${{ contains(github.event.head_commit.message, '[r2]') }}
run: npm i -D @aws-sdk/client-s3
# script:
- run: npm run b
- name: Run pb
run: npm run pb
- name: build
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BUILD_NUMBER: ${{ secrets.BUILD_NUMBER }}
WORKFLOW_NAME: ${{ github.workflow }}
run: node build/bin/build-win-appx