Skip to content

Commit 3e9ddfc

Browse files
feat: Dynamic Releases (#115)
Co-authored-by: Edgar R. M. <edgarrm358@gmail.com>
1 parent cfbb5d8 commit 3e9ddfc

File tree

2 files changed

+74
-8
lines changed

2 files changed

+74
-8
lines changed

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Upload Python Package
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
contents: write
9+
id-token: write
10+
11+
jobs:
12+
build_deploy:
13+
14+
runs-on: ubuntu-latest
15+
environment: publishing
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
with:
20+
fetch-depth: 0
21+
- name: Set up Python
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: '3.10'
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install poetry
29+
- name: Build package
30+
run: |
31+
poetry self add "poetry-dynamic-versioning[plugin]"
32+
poetry config repositories.testpypi https://test.pypi.org/legacy/
33+
poetry dynamic-versioning --no-cache
34+
poetry build
35+
- name: Upload wheel to release
36+
uses: svenstaro/upload-release-action@v2
37+
with:
38+
repo_token: ${{ secrets.GITHUB_TOKEN }}
39+
file: dist/*.whl
40+
tag: ${{ github.ref }}
41+
overwrite: true
42+
file_glob: true
43+
- name: Deploy to PyPI
44+
uses: pypa/gh-action-pypi-publish@v1.8.5

pyproject.toml

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,35 @@
11
[tool.poetry]
2-
name = "tap-postgres"
3-
version = "0.0.1"
4-
description = "`tap-postgres` is a Singer tap for Postgres, built with the Meltano SDK for Singer Taps."
5-
authors = ["AutoIDM"]
2+
name = "meltanolabs-tap-postgres"
3+
version = "0.0.0"
4+
description = "`tap-postgres` is a Singer tap for Postgres, built with the Meltano SDK for Singer Targets."
5+
authors = ["Meltano Team and Contributors <hello@meltano.com>"]
6+
maintainers = ["Meltano Team and Contributors <hello@meltano.com>"]
7+
license = "MIT"
8+
readme = "README.md"
9+
homepage = "https://meltano.com"
10+
repository = "https://github.com/meltanolabs/tap-postgres"
611
keywords = [
7-
"ELT",
812
"Postgres",
13+
"Singer",
14+
"ELT",
15+
"Meltano",
16+
"Meltano SDK",
17+
]
18+
classifiers = [
19+
"Intended Audience :: Developers",
20+
"License :: OSI Approved :: MIT License",
21+
"Operating System :: OS Independent",
22+
"Programming Language :: Python :: 3.7",
23+
"Programming Language :: Python :: 3.8",
24+
"Programming Language :: Python :: 3.9",
25+
"Programming Language :: Python :: 3.10",
26+
"Programming Language :: Python :: 3.11",
27+
"Programming Language :: Python :: Implementation :: CPython",
928
]
10-
license = "Apache 2.0"
29+
packages = [
30+
{ include = "tap_postgres" }
31+
]
32+
1133

1234
[tool.poetry.dependencies]
1335
python = "<3.12,>=3.8.1"
@@ -44,8 +66,8 @@ module = [
4466
]
4567

4668
[build-system]
47-
requires = ["poetry-core>=1.0.8"]
48-
build-backend = "poetry.core.masonry.api"
69+
requires = ["poetry-core>=1.0.8", "poetry-dynamic-versioning"]
70+
build-backend = "poetry_dynamic_versioning.backend"
4971

5072
[tool.poetry.scripts]
5173
# CLI declaration

0 commit comments

Comments
 (0)