Skip to content

Commit

Permalink
Merge pull request #10 from gwax/gwax/github-acton-publishing
Browse files Browse the repository at this point in the history
Using GitHub Actions for publishing tagged releases.
  • Loading branch information
gwax committed Jun 5, 2022
2 parents 72c3688 + d97dabb commit c1bee4c
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 2 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI

on: push

jobs:
build-n-publish:
runs-on: ubuntu-latest
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI

steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2

- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
- name: Publish distribution 📦 to Test PyPI
# TODO(gwax): use setuptools_scm instead of only pushing tags to test pypi
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@v1.5.0
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@v1.5.0
with:
password: ${{ secrets.PYPI_API_TOKEN }}
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ Changelog
Upcoming
--------

- Build and release using GitHub Actions
- Switch over to pydantic for Scryfall data deserialization
- Bug fixes for newer sets that do not include a numeric component to ther
collector numbers.
Expand Down
2 changes: 0 additions & 2 deletions release_requirements.txt

This file was deleted.

0 comments on commit c1bee4c

Please sign in to comment.