Skip to content

Commit

Permalink
feat: Dynamic Releases (#115)
Browse files Browse the repository at this point in the history
Co-authored-by: Edgar R. M. <[email protected]>
  • Loading branch information
visch and edgarrmondragon authored May 1, 2023
1 parent cfbb5d8 commit 3e9ddfc
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 8 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Upload Python Package

on:
release:
types: [published]

permissions:
contents: write
id-token: write

jobs:
build_deploy:

runs-on: ubuntu-latest
environment: publishing

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
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
uses: pypa/[email protected]
38 changes: 30 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,35 @@
[tool.poetry]
name = "tap-postgres"
version = "0.0.1"
description = "`tap-postgres` is a Singer tap for Postgres, built with the Meltano SDK for Singer Taps."
authors = ["AutoIDM"]
name = "meltanolabs-tap-postgres"
version = "0.0.0"
description = "`tap-postgres` is a Singer tap for Postgres, built with the Meltano SDK for Singer Targets."
authors = ["Meltano Team and Contributors <[email protected]>"]
maintainers = ["Meltano Team and Contributors <[email protected]>"]
license = "MIT"
readme = "README.md"
homepage = "https://meltano.com"
repository = "https://github.com/meltanolabs/tap-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",
]
license = "Apache 2.0"
packages = [
{ include = "tap_postgres" }
]


[tool.poetry.dependencies]
python = "<3.12,>=3.8.1"
Expand Down Expand Up @@ -44,8 +66,8 @@ module = [
]

[build-system]
requires = ["poetry-core>=1.0.8"]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core>=1.0.8", "poetry-dynamic-versioning"]
build-backend = "poetry_dynamic_versioning.backend"

[tool.poetry.scripts]
# CLI declaration
Expand Down

0 comments on commit 3e9ddfc

Please sign in to comment.