Skip to content

Commit

Permalink
feat: add releases using poetry-dynamic-versioning (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ken Payne authored Dec 8, 2022
1 parent a3caa38 commit 05ced37
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 3 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/release_workflow.yml
Original file line number Diff line number Diff line change
@@ -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 }}"
10 changes: 7 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
[tool.poetry]
name = "target-snowflake"
version = "0.0.1"
version = "0.0.0"
description = "`target-snowflake` is a Singer target for Snowflake, built with the Meltano SDK for Singer Targets."
readme = "README.md"
authors = ["Ken Payne"]
keywords = [
"ELT",
"Snowflake",
]
license = "Apache 2.0"
packages = [
{ include = "target_snowflake" }
]

[tool.poetry.dependencies]
python = "<3.11,>=3.7.1"
Expand All @@ -31,8 +35,8 @@ multi_line_output = 3 # Vertical Hanging Indent
src_paths = "target_snowflake"

[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
3 changes: 3 additions & 0 deletions target_snowflake/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""Singer.io Target for the Snowflake data warehouse platform."""

__version__ = "0.0.0"

0 comments on commit 05ced37

Please sign in to comment.