Initial Commit #157
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |