Skip to content

Commit

Permalink
Merge pull request #27 from bretterer/dynamic-versioning
Browse files Browse the repository at this point in the history
Update python publish to use dynamic versioning
  • Loading branch information
natekspencer authored Aug 4, 2023
2 parents 54c3104 + beb61e4 commit 4b7f087
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 29 deletions.
30 changes: 9 additions & 21 deletions .github/workflows/python-publish.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
# An action to build and publish python package to https://pypi.org/ using poetry https://github.com/sdispater/poetry
# For more information see: https://github.com/marketplace/actions/publish-python-poetry-package

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
Expand All @@ -9,32 +9,20 @@
name: Upload Python Package

on:
release:
types: [published]
push:
tags:
- "v?*.*.*"

permissions:
contents: read

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Setup Poetry
uses: abatilo/actions-poetry@v2
- name: Install dependencies
run: |
poetry install
- name: Build package
run: |
poetry build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
- name: Build and publish to pypi
uses: JRubics/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
pypi_token: ${{ secrets.PYPI_API_TOKEN }}
plugins: "poetry-dynamic-versioning-plugin"
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 9 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "rivian-python-client"
version = "0.2.4"
version = "0.0.0"
description = "Rivian API Client (Unofficial)"
readme = "README.md"
authors = ["Brian Retterer <[email protected]>"]
Expand All @@ -12,19 +12,21 @@ packages = [
[tool.poetry.dependencies]
python = "^3.9"
aiohttp = ">=3.0.0"
yarl = ">=1.6.0"
cryptography = "^41.0.1"
backports-strenum = { version = "^1.2.4", python = "<3.11" }

[tool.poetry.dev-dependencies]
[tool.poetry.group.dev.dependencies]
pytest = "^7.1.2"
pytest-asyncio = "^0.18.3"
python-dotenv = "^0.20.0"
aresponses = "^2.1.5"

[tool.poetry-dynamic-versioning]
enable = true
vcs = "git"
style = "semver"
pattern = "default-unprefixed"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"


requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
build-backend = "poetry_dynamic_versioning.backend"

0 comments on commit 4b7f087

Please sign in to comment.