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
# .github/workflows | |
name: Automated Setup Generation | |
# Workflow triggers | |
on: | |
workflow_dispatch: # Allows manual triggering of the workflow | |
push: # Triggers the workflow on every push to the repository | |
jobs: | |
format-setup-customized: | |
runs-on: ubuntu-latest # Specifies the virtual machine to use, in this case, the latest version of Ubuntu | |
# Defines permissions for this job | |
permissions: | |
contents: write # Permissions to write to the repository | |
steps: | |
- uses: actions/checkout@v4 # Checks out the code from the repository | |
# Step to update and prepare the documentation | |
- name: Prepare and Update Documentation | |
run: | | |
# Verifica si setup.py existe, si no, lo crea | |
if [ ! -f "setup.py" ]; then | |
echo """import os | |
from setuptools import setup | |
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme: | |
README = readme.read() | |
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) | |
setup( | |
name=\"${{ vars.DOCS_MODULE }}\", | |
version='0.1', | |
packages=[\"${{ vars.DOCS_MODULE }}\"], | |
author=\"${{ vars.DOCS_AUTHOR }}\", | |
author_email=\"${{ vars.DOCS_EMAIL }}\", | |
maintainer=\"${{ vars.DOCS_AUTHOR }}\", | |
maintainer_email=\"${{ vars.DOCS_EMAIL }}\", | |
download_url='', | |
install_requires=[ | |
], | |
scripts=[ | |
], | |
include_package_data=True, | |
license='Simplified BSD License', | |
description=\"\", | |
zip_safe=False, | |
long_description=README, | |
long_description_content_type='text/markdown', | |
python_requires='>=3.7', | |
#https://pypi.org/classifiers/ | |
classifiers=[ | |
], | |
) | |
""" >> setup.py | |
fi | |
# Commit all changed files back to the repository | |
- uses: stefanzweifel/git-auto-commit-action@v5 |