diff --git a/.github/workflows/release_workflow.yml b/.github/workflows/release_workflow.yml new file mode 100644 index 00000000..51b10896 --- /dev/null +++ b/.github/workflows/release_workflow.yml @@ -0,0 +1,41 @@ +name: Upload Python Package + +on: + release: + types: [created] + +jobs: + build_deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.10' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install poetry + - name: Build package + run: | + poetry self add "poetry-dynamic-versioning[plugin]" + poetry config repositories.testpypi https://test.pypi.org/legacy/ + poetry dynamic-versioning --no-cache + poetry build + - name: Upload wheel to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: dist/*.whl + tag: ${{ github.ref }} + overwrite: true + file_glob: true + - name: Deploy to PyPI + run: | + poetry publish -r testpypi -u "__token__" -p "${{ secrets.TEST_PYPI_TOKEN }}" + poetry publish -u "__token__" -p "${{ secrets.PYPI_TOKEN }}" \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d7685016..906a15d3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,13 +1,34 @@ [tool.poetry] -name = "target-postgres" +name = "meltanolabs-target-postgres" version = "0.0.1" description = "`target-postgres` is a Singer target for Postgres, built with the Meltano SDK for Singer Targets." -authors = ["Meltano"] +authors = ["Meltano Team and Contributors"] +maintainers = ["Meltano Team and Contributors"] +license = "MIT" +readme = "README.md" +homepage = "https://meltano.com" +repository = "https://github.com/meltanolabs/target-postgres" keywords = [ - "ELT", "Postgres", + "Singer", + "ELT", + "Meltano", + "Meltano SDK", +] +classifiers = [ + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: Implementation :: CPython", +] +packages = [ + { include = "target_postgres" } ] -license = "Apache 2.0" [tool.poetry.dependencies] python = "<3.12,>=3.7.1"