Skip to content

Commit

Permalink
chore: Rename package to meltano-tap-hubspot (#70)
Browse files Browse the repository at this point in the history
* chore: Rename package to `meltano-tap-hubspot`

* Modernize release workflow
  • Loading branch information
edgarrmondragon authored Jan 25, 2024
1 parent bddc96f commit 4fed92a
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 40 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
nox==2023.4.22
nox-poetry==1.0.2
pip==23.1.2
poetry==1.5.1
poetry-dynamic-versioning==0.24.0
nox-poetry==1.0.3
pip==23.3.2
poetry==1.7.1
poetry-dynamic-versioning==1.2.0
53 changes: 22 additions & 31 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,51 +1,42 @@
name: Publish with Dynamic Versioning
name: Build

on:
release:
types: [published]
on: push

permissions:
contents: write
id-token: write
contents: write # Upload artifacts to release
id-token: write # Use PyPI trusted publishing

jobs:
publish:
name: Publish to PyPI
build:
name: Build and Inspect
runs-on: ubuntu-latest
environment: publishing
env:
PIP_CONSTRAINT: .github/workflows/constraints.txt
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/[email protected]
with:
fetch-depth: 0
- uses: hynek/build-and-inspect-python-package@v2

- name: Set up Python
uses: actions/[email protected]
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
needs: [build]
environment:
name: publishing
url: https://pypi.org/p/meltano-tap-hubspot
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/[email protected]
with:
python-version: "3.10"

- name: Upgrade pip
run: |
pip install pip
pip --version
- name: Install Poetry
run: |
pipx install poetry
pipx inject poetry poetry-dynamic-versioning[plugin]
poetry --version
poetry self show plugins
- name: Build
run: poetry build

name: Packages
path: dist
- 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: Publish
uses: pypa/[email protected].7
uses: pypa/[email protected].11
16 changes: 11 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
[tool.poetry]
name = "tap-hubspot"
version = "0.0.1"
name = "meltano-tap-hubspot"
version = "0.0.0"
description = "`tap-hubspot` is a Singer tap for tap-hubspot, built with the Meltano Singer SDK."
readme = "README.md"
authors = ["Ethan Stein"]
keywords = [
"ELT",
"tap-hubspot",
]
license = "Apache 2.0"
license = "Apache-2.0"
packages = [
{ include = "tap_hubspot" },
]

[tool.poetry.dependencies]
python = "<3.12,>=3.7.1"
Expand Down Expand Up @@ -52,9 +55,12 @@ known-first-party = ["tap_hubspot"]
convention = "google"

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

[tool.poetry.scripts]
# CLI declaration
tap-hubspot = 'tap_hubspot.tap:TapHubspot.cli'

[tool.poetry-dynamic-versioning]
enable = true

0 comments on commit 4fed92a

Please sign in to comment.