Skip to content

Commit

Permalink
Provide build for win7 [skip mac][skip linux]
Browse files Browse the repository at this point in the history
  • Loading branch information
zxdong262 committed Jun 19, 2024
1 parent 996f6ac commit 8a69588
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 3 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/win7-tar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# 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: win7-tar

on:
push:
branches: [ build, test ]

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 win7-tar]')"

steps:
- uses: actions/checkout@v4
- name: Use Node.js 16.x
uses: actions/setup-node@v4
with:
node-version: 16.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 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 -d electron@22.3.27
- run: npm i
- run: npm i -S -E node-pty@1.1.0-beta14
- run: npm i -S -E serialport@10.4.0

# script:
- run: npm run prepare-build

- name: build
if: "!contains(github.event.head_commit.message, 'skip build')"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BUILD_NUMBER: ${{ secrets.BUILD_NUMBER }}
CUSTOM_UPLOAD_URL: ${{ secrets.CUSTOM_UPLOAD_URL }}
run: node build/bin/build-win7-tar

18 changes: 18 additions & 0 deletions build/bin/build-win7-tar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const { rm, echo } = require('shelljs')
const {
run,
writeSrc,
builder
} = require('./build-common')

async function main () {
const pb = builder
echo('running build for win part 1')

echo('build tar.gz')
rm('-rf', 'dist')
writeSrc('win7-x64.tar.gz')
await run(`${pb} --win tar.gz`)
}

main()
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "electerm",
"version": "1.39.50",
"version": "1.39.51",
"description": "Terminal/ssh/telnet/serialport/sftp client(linux, mac, win)",
"main": "app.js",
"bin": "npm/electerm",
Expand Down

0 comments on commit 8a69588

Please sign in to comment.