-
Notifications
You must be signed in to change notification settings - Fork 84
65 lines (56 loc) · 2.03 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: AiNiee-chatgpt Action monitors the main branch commit and automatically packs it into an exe file to Beta release.
on:
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
push:
branches:
- main
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.12
- name: Install Requirements
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
python -m pip install -r requirements.txt
python -m pip cache purge
- name: Build EXE
run: python .\Tools\pyinstall.py
- name: Pack Resource
run: |
Copy-Item -Path "Resource" -Destination "dist\Resource" -Recurse -Force
Copy-Item -Path "StevExtraction" -Destination "dist\StevExtraction" -Recurse -Force
Copy-Item -Path "Plugin_Scripts" -Destination "dist\Plugin_Scripts" -Recurse -Force
Compress-Archive -Path "dist" -DestinationPath "AiNiee-Beta.zip"
- name: Delete release
uses: dev-drprasad/delete-tag-and-release@v0.2.1
with:
tag_name: Beta
delete_release: true
env:
GITHUB_TOKEN: ${{ secrets.AINIEE }}
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.AINIEE }}
with:
tag_name: Beta
release_name: AiNiee-Beta 开发测试版本,由最新源码自动打包
draft: false
prerelease: true
- name: Upload file
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.AINIEE }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./AiNiee-Beta.zip
asset_name: AiNiee-Beta.zip
asset_content_type: application/octet-stream