-
-
Notifications
You must be signed in to change notification settings - Fork 12
64 lines (59 loc) · 1.66 KB
/
cd.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
name: CD
on:
push:
branches:
- master
paths:
- '.github/workflows/**'
- 'primenet.py'
schedule:
- cron: '0 0 1 * *'
workflow_dispatch:
jobs:
PyInstaller:
name: PrimeNet Windows PyInstaller
runs-on: windows-latest
strategy:
matrix:
architecture: ["x86", "x64"]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
architecture: ${{ matrix.architecture }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install requests pyinstaller
- name: Script
run: |
python -X dev primenet.py --help
curl -sSO https://www.mersenne.org/favicon.ico
pyinstaller -F -i favicon.ico primenet.py
./dist/primenet --help
- uses: actions/upload-artifact@v4
with:
name: PrimeNet_Windows_${{ matrix.architecture }}
path: |
README.md
dist/*
deploy:
name: PrimeNet Windows Deploy
needs: PyInstaller
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
- name: Install
run: |
sudo apt-get update -y
sudo apt-get install -y lftp
- name: Script
run: |
set -x
ls -alR PrimeNet_Windows_*
for DIR in PrimeNet_Windows_*/; do (cd "$DIR"; zip -j "../${DIR%/}" -- README.md dist/*); done
ls -alR PrimeNet_Windows_*
lftp -u "${{ secrets.FTP_USERNAME }},${{ secrets.FTP_PASSWORD }}" -e "set ssl:verify-certificate false; mput PrimeNet_Windows_*.zip; exit" download.mersenne.ca