LotteryAutoScript/.github/workflows/pkg.yml
2021-12-13 14:44:55 +08:00

42 lines
954 B
YAML

name: "Package Node.js project into an executable"
on:
push:
branches:
- main
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