diff --git a/.github/workflows/release_workflow.yml b/.github/workflows/release_workflow.yml new file mode 100644 index 0000000..69e9411 --- /dev/null +++ b/.github/workflows/release_workflow.yml @@ -0,0 +1,40 @@ +name: Build and publish + +on: + push: + +jobs: + build: + name: Build wheel and sdist + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ github.ref }} + - uses: hynek/build-and-inspect-python-package@v2 + + publish: + name: Publish to PyPI + if: startsWith(github.ref, 'refs/tags/') + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/meltanolabs-tap-mysql + needs: build + permissions: + contents: write + id-token: write + + steps: + - uses: actions/download-artifact@v4 + with: + name: Packages + path: dist + - uses: svenstaro/upload-release-action@v2 + with: + file: dist/*.whl + tag: ${{ github.ref }} + overwrite: true + file_glob: true + - uses: pypa/gh-action-pypi-publish@v1.8.11 diff --git a/pyproject.toml b/pyproject.toml index 2734edf..9767f2d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,14 +1,36 @@ [tool.poetry] -name = "tap-mysql" -version = "0.0.1" +name = "meltanolabs-tap-mysql" +version = "0.0.0" description = "`tap-mysql` is a Singer tap for mysql, built with the Meltano Singer SDK." +authors = ["Meltano Team and Contributors "] +maintainers = ["Meltano Team and Contributors "] +license = "MIT" readme = "README.md" -authors = ["AutoIDM"] +homepage = "https://meltano.com" +repository = "https://github.com/meltanolabs/tap-mysql" keywords = [ + "MySQL", + "Vitess", + "PlanetScale", + "Singer", "ELT", - "mysql", + "Meltano", + "Meltano SDK", +] +classifiers = [ + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: Implementation :: CPython", +] +packages = [ + { include = "tap_mysql" } ] -license = "Apache-2.0" [tool.poetry.dependencies] python = ">=3.8" @@ -71,9 +93,14 @@ known-first-party = ["tap_mysql"] convention = "google" [build-system] -requires = ["poetry-core==1.9.0"] -build-backend = "poetry.core.masonry.api" +requires = ["poetry-core==1.9.0", "poetry-dynamic-versioning"] +build-backend = "poetry_dynamic_versioning.backend" [tool.poetry.scripts] # CLI declaration tap-mysql = 'tap_mysql.tap:TapMySQL.cli' + +[tool.poetry-dynamic-versioning] +enable = true +vcs = "git" +style = "pep440"