Skip to content

Commit b88e45a

Browse files
committed
Workflow to publish package
1 parent 751a253 commit b88e45a

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

.github/workflows/publish.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
name: Build package and publish to PyPI
10+
runs-on: ubuntu-latest
11+
defaults:
12+
run:
13+
shell: bash
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
- name: Set up Python 3.10
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: "3.10"
22+
23+
- name: Setup poetry
24+
uses: abatilo/[email protected]
25+
with:
26+
poetry-version: "1.1.12"
27+
28+
- name: Authenticate poetry
29+
run: poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
30+
31+
- name: Build package
32+
run: poetry build
33+
34+
- name: Check that tag matches version
35+
id: check_files
36+
uses: andstor/file-existence-action@v1
37+
with:
38+
files: "dist/blueskyapi-${{ github.ref_name }}.tar.gz"
39+
40+
- name: Publish package
41+
run: poetry publish

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "blueskyapi"
3-
version = "0.1.0"
3+
version = "0.1.0a2"
44
description = "Client for blueskyapi.io"
55
authors = ["blueskyapi.io <[email protected]>"]
66
license = "MIT"

0 commit comments

Comments
 (0)