File tree Expand file tree Collapse file tree 1 file changed +64
-0
lines changed
Expand file tree Collapse file tree 1 file changed +64
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' V*.*.*'
7+
8+ jobs :
9+ build :
10+ name : Build on ${{ matrix.os }}
11+ runs-on : ${{ matrix.os }}
12+ strategy :
13+ matrix :
14+ os : [ubuntu-22.04, windows-latest, macos-latest]
15+
16+ steps :
17+ - name : Checkout repository
18+ uses : actions/checkout@v4
19+
20+ - name : Set up Python
21+ uses : actions/setup-python@v5
22+ with :
23+ python-version : ' 3.11'
24+
25+ - name : Install dependencies
26+ run : |
27+ python -m pip install --upgrade pip
28+ pip install pyinstaller requests beautifulsoup4
29+
30+ - name : Build executable
31+ run : |
32+ pyinstaller --onefile AFHscraper.py
33+ shell : bash
34+
35+ - name : Upload build artifact
36+ uses : actions/upload-artifact@v4
37+ with :
38+ name : ${{ matrix.os }}-build
39+ path : dist/
40+
41+ release :
42+ name : Create Release
43+ runs-on : ubuntu-22.04
44+ needs : build
45+ permissions :
46+ contents : write
47+ steps :
48+ - name : Download build artifacts
49+ uses : actions/download-artifact@v4
50+ with :
51+ path : builds
52+
53+ - name : Create GitHub Release
54+ uses : softprops/action-gh-release@v2
55+ with :
56+ tag_name : ${{ github.ref_name }}
57+ name : Release ${{ github.ref_name }}
58+ body : |
59+ Automated release for ${{ github.ref_name }}.
60+ Built with PyInstaller for Windows, macOS, and Linux.
61+ files : |
62+ builds/**/*
63+ env :
64+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments