Skip to content

Commit

Permalink
Use Github CI to publish to PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepqr committed Apr 25, 2021
1 parent ca6d106 commit 943765b
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
43 changes: 43 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build and publish to PyPI

on:
push:
branches:
- main
release:
types:
- published

jobs:
publish:
if: github.repository == 'mikepqr/ambient-archiver'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build binary wheel and source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
- name: Publish to PyPI
if: github.event.action == 'published'
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = ambient-archiver
version = 0.1.2
version = 0.1.3
description = Archive your data from ambientweather.net
long_description = file: README.md
long_description_content_type = text/markdown
Expand Down

0 comments on commit 943765b

Please sign in to comment.