Skip to content

Commit

Permalink
chore: Use dynamic versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Jan 18, 2024
1 parent bf606b6 commit 7ac6a3c
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 25 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,25 @@ jobs:
fetch-depth: 0
- uses: hynek/build-and-inspect-python-package@v2

# publish:
# runs-on: ubuntu-latest
# needs: build
# environment:
# name: publishing
# url: https://pypi.org/project/tap-stackexchange/
# if: startsWith(github.ref, 'refs/tags/')
# steps:
# - uses: actions/download-artifact@v4
# with:
# name: Packages
# path: dist
# - name: Upload wheel to release
# uses: svenstaro/upload-release-action@v2
# with:
# file: dist/*.whl
# tag: ${{ github.ref }}
# overwrite: true
# file_glob: true
publish:
runs-on: ubuntu-latest
needs: build
environment:
name: publishing
url: https://pypi.org/project/tap-stackexchange/
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v4
with:
name: Packages
path: dist
- name: Upload wheel to release
uses: svenstaro/upload-release-action@v2
with:
file: dist/*.whl
tag: ${{ github.ref }}
overwrite: true
file_glob: true

# - name: Publish
# uses: pypa/[email protected]
- name: Publish
uses: pypa/[email protected]
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/tox-dev/pyproject-fmt
rev: "1.5.3"
hooks:
- id: pyproject-fmt

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: 'v0.1.13'
Expand Down
16 changes: 13 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "tap-stackexchange"
version = "0.0.1"
version = "0.0.0"
description = "`tap-stackexchange` is a Singer tap for StackExchange, built with the Meltano SDK for Singer Taps."
authors = ["Edgar Ramírez-Mondragón <[email protected]>"]
classifiers = [
Expand All @@ -13,6 +13,8 @@ classifiers = [
]
keywords = [
"ELT",
"meltano",
"singer-io",
"StackExchange",
]
license = "Apache-2.0"
Expand All @@ -35,13 +37,21 @@ module = [
ignore_missing_imports = true

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

[tool.poetry.scripts]
# CLI declaration
tap-stackexchange = 'tap_stackexchange.tap:TapStackExchange.cli'

[tool.poetry-dynamic-versioning]
enable = true
metadata = true
style = "pep440"

[tool.ruff]
line-length = 88
target-version = "py38"
Expand Down
2 changes: 1 addition & 1 deletion tap_stackexchange/tap.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class TapStackExchange(Tap):
th.Property(
"tags",
th.ArrayType(th.StringType),
default=["LimeSurvey"],
default=[],
description="Question tags",
),
th.Property(
Expand Down

0 comments on commit 7ac6a3c

Please sign in to comment.