LotteryAutoScript/.github/workflows/pkg.yml
2022-08-23 11:46:23 +08:00

40 lines
927 B
YAML

name: "Package Node.js project into an executable"
on:
push:
paths:
- "lib/**"
- "*.js"
- "*.json"
workflow_dispatch:
jobs:
build_all:
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: |
sudo apt install zip unzip
npm install
npm run build_all
- name: "Upload to artifact"
uses: actions/upload-artifact@v2
with:
name: all_platform
path: dist/
- name: "Upload to release draft"
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
file: "dist/*.zip"
delete_file: "dist/*.zip"
tag_name: "v2"
overwrite: true