diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml new file mode 100644 index 0000000..05cfc81 --- /dev/null +++ b/.github/workflows/pythonpublish.yml @@ -0,0 +1,22 @@ +name: Upload to PyPI + +on: + release: + types: [published] + +jobs: + deploy: + runs-on: ubuntu-latest + environment: publishing + permissions: + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write + steps: + # install build package and build dist + - name: Build distribution + run: >- + python3 -m pip install build --user + python3 -m build --sdist --wheel --outdir dist/ + # retrieve your distributions here + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file diff --git a/setup.py b/setup.py index b08b19b..e9f2a06 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,5 @@ import setuptools +from glob import glob import riscemu @@ -34,6 +35,9 @@ setuptools.setup( package_data={ "riscemu": ["libc/*.s", "py.typed"], }, + data_files=[ + ('libc', glob('libc/*.s')), + ], scripts=["riscemu/tools/riscemu"], python_requires=">=3.8", install_requires=["pyelftools~=0.27"],