Skip to content

Commit c67465f

Browse files
author
clickingbuttons
authored
setup releasing on pushing a tag (#149)
1 parent 5f25dab commit c67465f

File tree

3 files changed

+51
-13
lines changed

3 files changed

+51
-13
lines changed

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: release
2+
on:
3+
push:
4+
tags:
5+
- v*
6+
branches:
7+
- master
8+
permissions:
9+
contents: read
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
name: Release to PyPi
14+
steps:
15+
- uses: actions/checkout@v3
16+
- name: Setup Python
17+
uses: actions/setup-python@v3
18+
with:
19+
python-version: 3.10
20+
- name: Setup Poetry
21+
uses: abatilo/[email protected]
22+
with:
23+
poetry-version: 1.2.0b1
24+
- name: Setup release plugin
25+
run: poetry plugin add poetry-dynamic-versioning-plugin
26+
- name: Install pypi deps
27+
run: poetry install
28+
- name: Build
29+
run: poetry build
30+
- name: Publish to PyPi
31+
run: poetry publish

poetry.lock

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "polygon-api-client"
3-
version = "1.0.0.beta1"
3+
version = "0.0.0"
44
description = "Official Polygon.io REST and Websocket client."
55
authors = ["polygon.io"]
66
license = "MIT"
@@ -38,5 +38,12 @@ sphinx-rtd-theme = "^1.0.0"
3838
sphinx-autodoc-typehints = "^1.18.1"
3939

4040
[build-system]
41-
requires = ["poetry-core>=1.0.0"]
42-
build-backend = "poetry.core.masonry.api"
41+
# so releasing doesn't have to touch the "version" in this file
42+
# we have to use a beta release of poetry and this plugin:
43+
# https://pypi.org/project/poetry-dynamic-versioning-plugin/
44+
requires = ["poetry>=1.2.0b1", "poetry-dynamic-versioning-plugin"]
45+
build-backend = "poetry.masonry.api"
46+
47+
[tool.poetry-dynamic-versioning]
48+
enable = true
49+
style = "semver"

0 commit comments

Comments
 (0)