mirror of
https://github.com/shanmiteko/LotteryAutoScript.git
synced 2026-06-04 21:01:17 +08:00
83 lines
2.0 KiB
YAML
83 lines
2.0 KiB
YAML
name: "Package Node.js project into an executable"
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "lib/**"
|
|
- "main.js"
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "lib/**"
|
|
- "main.js"
|
|
workflow_dispatch:
|
|
branches:
|
|
- main
|
|
jobs:
|
|
pkg_x64:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- name: "Checkout codes"
|
|
uses: actions/checkout@v2
|
|
- name: "Use Node.js"
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: "16"
|
|
- name: "Pkg this"
|
|
run: |
|
|
npm install
|
|
npm run pkg_x64
|
|
- name: "Upload to artifact(win)"
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: nlts-win-x64
|
|
path: dist/nlts-win-x64/
|
|
- name: "Upload to artifact(linux)"
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: nlts-linux-x64
|
|
path: dist/nlts-linux-x64/
|
|
- name: "Upload to artifact(macos)"
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: nlts-macos-x64
|
|
path: dist/nlts-macos-x64/
|
|
# pkg_arm64:
|
|
# runs-on: ubuntu-latest
|
|
# steps:
|
|
# - name: "Checkout codes"
|
|
# uses: actions/checkout@v2
|
|
# - name: "Use Node.js"
|
|
# uses: actions/setup-node@v1
|
|
# with:
|
|
# node-version: "16"
|
|
# - name: "Pkg this"
|
|
# run: |
|
|
# npm install
|
|
# npm run pkg_arm64
|
|
# - name: "Upload to artifact"
|
|
# uses: actions/upload-artifact@v2
|
|
# with:
|
|
# name: nlts-linux-arm64
|
|
# path: dist/
|
|
# pkg_armv7:
|
|
# runs-on: ubuntu-latest
|
|
# steps:
|
|
# - name: "Checkout codes"
|
|
# uses: actions/checkout@v2
|
|
# - name: "Use Node.js"
|
|
# uses: actions/setup-node@v1
|
|
# with:
|
|
# node-version: "16"
|
|
# - name: "Pkg this"
|
|
# run: |
|
|
# npm install
|
|
# npm run pkg_armv7
|
|
# - name: "Upload to artifact"
|
|
# uses: actions/upload-artifact@v2
|
|
# with:
|
|
# name: nlts-linux-armv7
|
|
# path: dist/
|