-
-
Notifications
You must be signed in to change notification settings - Fork 0
122 lines (101 loc) · 3.87 KB
/
deploy.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
116
117
118
119
120
121
122
on: [push]
jobs:
deploy:
runs-on: ubuntu-latest
# TODO how the fuck does this not have pip? or python for that matter? fucking garbage.
container: quay.io/pypa/manylinux2014_x86_64
#container: quay.io/pypa/manylinux_2_28_x86_64
steps:
- name: Update
#run: sudo apt update
run: pkg update
- name: APT Cache
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: >
python3-dev
- name: Upgrade
run: sudo apt upgrade -y
#run: apk upgrade
- name: Setup Python Headers
run: sudo apt install python3-dev
#run: apk install python3-dev
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Setup Python
uses: actions/setup-python@v5
with:
architecture: x64
cache: 'pip'
python-version: '3.x'
#python-version: '3.12'
- name: Bump Version
id: tag_version
uses: mathieudutour/github-tag-action@v6.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
verbose: true
# TODO build a wheel and upload it so docker build works. simple problem statement. shouldn't be so fucking difficult
- name: Install Requirements
run: pip install --upgrade --no-deps -r requirements.txt
#run: python -m pip install --upgrade --no-deps -r requirements.txt
- name: Build Wheel
run: pip wheel -w dist/ .
#run: python -m pip wheel -w dist/ .
# TODO well, I've installed the fuck outta cython, so if you can't find it, then here be more shitty software
#- name: Install Tox
# run: pip install tox
#
#- name: Run Tox
# run: tox
# TODO ABI version. what a piece of shit
#- name: Install AuditWheel
# run: pip install auditwheel
# #run: python -m pip install auditwheel
#
#- name: Fix Wheel
# run: auditwheel repair -w dist/ dist/*.whl
# #run: python -m auditwheel repair -w dist/ dist/*.whl
# TODO just build whatever fucking version. god damn it.
#- name: Install cibuildwheel
# run: pip install cibuildwheel
#- name: Build wheels
# run: cibuildwheel --output-dir dist/
# env:
# CIBW_BEFORE_BUILD: pip install Cython setuptools wheel
# #CIBW_BUILD: cp312
# TODO pyinstaller because holy fuck I just wanna run a fucking helloworld program but that's too much to fucking ask for
- name: Install Twine
run: pip install twine
#run: python -m pip install twine
- name: Distribute
#run: twine upload --verbose dist/*.whl
run: python -m twine upload --verbose dist/*.whl
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
# TODO something about the long_description. bullshit
#- name: Distribute
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# attestations: false
# user: __token__
# password: ${{ secrets.PYPI_API_TOKEN }}
# verbose: true
# and this is why InnovAnon code will never again be free ($200k cash up front or this shit is ours forever)
- name: Authenticate with Docker Hub
run: docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build Docker Image
run: docker build -t "innovanon/${{ github.event.repository.name }}:${{ steps.tag_version.outputs.new_tag }}" .
- name: Tag Docker Image
run: |
docker tag "innovanon/${{ github.event.repository.name }}:${{ steps.tag_version.outputs.new_tag }}" \
innovanon/${{ github.event.repository.name }}:latest
- name: Deploy Docker Image
run: |
docker push innovanon/${{ github.event.repository.name }}