-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.1 KB
/
build.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
name: Build Python Application with PyInstaller
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt || pip install scapy colorama pyinstaller
- name: Build with PyInstaller
run: |
pyinstaller --onefile network_scanner.py
- name: Upload the built file
uses: actions/upload-artifact@v3
with:
name: built-app
path: dist/
- name: Create Git Tag
id: tag
run: |
TAG_NAME="v$(date +'%Y%m%d%H%M%S')"
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
git tag $TAG_NAME
git push origin $TAG_NAME
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: dist/network_scanner
tag_name: ${{ env.TAG_NAME }}