Skip to content

Commit

Permalink
ci: Use hynek/build-and-inspect-python-package (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon authored Jan 3, 2024
1 parent 35eb287 commit 6bdfa45
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 38 deletions.
54 changes: 19 additions & 35 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,53 +1,37 @@
name: Publish with Dynamic Versioning
name: Build

on:
release:
types: [published]
push:

permissions:
contents: write
id-token: write

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

- name: Set up Python
uses: actions/setup-python@v5
publish:
runs-on: ubuntu-latest
needs: build
environment:
name: publishing
url: https://pypi.org/project/tap-betterstack
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v4
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: Upload wheel to release
uses: svenstaro/upload-release-action@v2
name: Packages
path: dist
- uses: svenstaro/upload-release-action@v2
with:
file: dist/*.whl
file: dist/*
tag: ${{ github.ref }}
overwrite: true
file_glob: true

- name: Publish
uses: pypa/gh-action-pypi-publish@v1.8.11
- uses: pypa/gh-action-pypi-publish@release/v1
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</a>
</div>

Singer tap for Geekbot.
Singer tap for [Geekbot](https://geekbot.com/).

Built with the [Meltano Tap SDK](https://sdk.meltano.com) for Singer Taps.

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[build-system]
build-backend = "poetry.core.masonry.api"
build-backend = "poetry_dynamic_versioning.backend"
requires = [
"poetry-core<1.9,>=1.8",
"poetry-core<2,>=1.8",
"poetry-dynamic-versioning",
]

Expand Down

0 comments on commit 6bdfa45

Please sign in to comment.