diff --git a/.github/workflows/upload_pypi.yml b/.github/workflows/upload_pypi.yml new file mode 100644 index 0000000..e160f78 --- /dev/null +++ b/.github/workflows/upload_pypi.yml @@ -0,0 +1,37 @@ +name: Build and upload to PyPI + +# Build on every branch push, tag push, and pull request change: +on: [push, pull_request] + +jobs: + build_wheel: + name: Build wheel + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Install build module + run: pip install build + + - name: Build wheel and source + run: python -m build --sdist --wheel --outdir dist/ . + + - uses: actions/upload-artifact@v3 + with: + path: dist/* + + upload_pypi: + needs: [build_wheel] + runs-on: ubuntu-latest + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') + steps: + - uses: actions/download-artifact@v3 + with: + name: artifact + path: dist + + - uses: pypa/gh-action-pypi-publish@v1.4.2 + with: + user: __token__ + password: ${{ secrets.pypi_password }} diff --git a/pyproject.toml b/pyproject.toml index 8b53c2d..2b44b3a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ [project] name = "mapfile_parser" -version = "0.0.1" +version = "0.1.0" description = "Map file parser library focusing decompilation projects" readme = "README.md" requires-python = ">=3.7" diff --git a/src/mapfile_parser/__init__.py b/src/mapfile_parser/__init__.py index b884e25..2dd059e 100644 --- a/src/mapfile_parser/__init__.py +++ b/src/mapfile_parser/__init__.py @@ -5,7 +5,7 @@ from __future__ import annotations -__version_info__ = (0, 0, 1) +__version_info__ = (0, 1, 0) __version__ = ".".join(map(str, __version_info__)) + "-dev" __author__ = "Decompollaborate"