-
Notifications
You must be signed in to change notification settings - Fork 70
115 lines (112 loc) · 3.35 KB
/
python-release.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: Building & Creating Distributables
on:
push:
branches: [ master, main ]
# Don't trigger if it's just a documentation update
paths-ignore:
- '**.md'
- '**.MD'
- '**.yml'
- '**.sh'
- 'docs/**'
- 'Dockerfile'
- 'LICENSE'
- '.gitattributes'
- '.gitignore'
- '.dockerignore'
jobs:
linux_job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Initialize Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.9
cache: 'pip'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
- name: Build Dist
run: |
python cli.py --version
pyinstaller --onefile --hidden-import=queue "cli.py" -n "comic_dl_linux"
chmod +x dist/comic_dl_linux
dist/comic_dl_linux --version
- name: Generate Release Tag
id: tag
run: |
echo "::set-output name=release_tag::$(dist/comic_dl_linux --version)"
echo Current Version ${{ steps.tag.outputs.release_tag }}.
- name: GH Release
uses: softprops/action-gh-release@v0.1.14
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag.outputs.release_tag }}
files: dist/comic_dl_linux
windows_job:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Initialize Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.9
cache: 'pip'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
- name: Build Dist
run: |
python cli.py --version
pyinstaller --onefile --hidden-import=queue "cli.py" -n "comic_dl.exe"
dist/comic_dl.exe --version
- name: Generate Release Tag
id: tag
run: |
echo "::set-output name=release_tag::$(dist/comic_dl.exe --version)"
echo Current Version ${{ steps.tag.outputs.release_tag }}.
- name: GH Release
uses: softprops/action-gh-release@v0.1.14
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag.outputs.release_tag }}
files: dist/comic_dl.exe
mac_os_job:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- name: Initialize Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.9
cache: 'pip'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
- name: Build Dist
run: |
python cli.py --version
pyinstaller --onefile --hidden-import=queue "cli.py" -n "comic_dl_osx"
chmod +x dist/comic_dl_osx
dist/comic_dl_osx --version
- name: Generate Release Tag
id: tag
run: |
echo "::set-output name=release_tag::$(dist/comic_dl_osx --version)"
echo Current Version ${{ steps.tag.outputs.release_tag }}.
- name: GH Release
uses: softprops/action-gh-release@v0.1.14
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag.outputs.release_tag }}
files: dist/comic_dl_osx