Skip to content

Commit

Permalink
Create build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
JdaieLin committed Jul 7, 2024
1 parent c27de99 commit fdfd136
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: build

on:
workflow_dispatch:

jobs:
build-and-release:
runs-on: ununtu-latest

steps:
# Checkout
- name: Checkout
uses: actions/checkout@v3

# Nodejs
- name: Setup Nodejs
uses: actions/setup-node@v3
with:
node-version: "18.x"

- name: install yarn
run: npm i yarn -g

- name: install node pkg
run: npm i pkg -g

# - name: Setup Python 2.7
# uses: actions/setup-python@v4
# with:
# architecture: x64
# python-version: "2.7"

- name: install deps
run: yarn

- name: build project 64bit
run: npx pkg -t node18-linux-arm64 -o ./build/sugar-wifi-conf-arm64 index.js

- name: build project 32bit
run: npx pkg -t node18-linux-armv7 -o ./build/sugar-wifi-conf-armv7 index.js

# Upload artifact
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: sugar-wifi-conf
path: |
build
if-no-files-found: warn

0 comments on commit fdfd136

Please sign in to comment.