Skip to content

Publish on release creation #43

Publish on release creation

Publish on release creation #43

Workflow file for this run

# SPDX-License-Identifier Apache-2.0
# Source: https:/dmyersturnbull/typed-dfs
#
# Build, test, and publish to releases, packages, PyPi, etc.
# Runs when creating a GitHub release
name: Publish on release creation
on:
release:
types: [published]
repository_dispatch:
types: [release-made]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install build meta-dependencies
run: |
pip install 'tox>=4.11' 'poetry-core>=1.7' 'wheel>=0.40,<1.0'
#- name: Test with tox
# run: |
# tox -v
- name: Build sdists and wheels with Poetry
run: |
poetry build
poetry install
- name: Attach artifacts to the GitHub release
uses: skx/github-action-publish-binaries@master
with:
args: "dist/*"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to PyPi
run: |
poetry publish -vv --username __token__ --password ${{ secrets.PYPI_TOKEN }}