Skip to content

Commit

Permalink
add publish action
Browse files Browse the repository at this point in the history
  • Loading branch information
markreidvfx committed Jun 23, 2022
1 parent 113e6d0 commit 109078e
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 6 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: publish

on:
release:
types: [published]

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Debug information
run: |
echo 'sha: ${{ github.sha }}'
echo 'ref: ${{ github.ref }}'
# This action will download the artifact for workflow runs that
# happen for this actual commit (the commit that the tag points to).
# It also restores the files timestamps.

- name: Download sdist from commit ${{ github.sha }}
uses: dawidd6/action-download-artifact@v2
with:
workflow: workflow.yml
workflow_conclusion: success
commit: ${{ github.sha }}
name: sdist
path: dist

- name: Display structure of downloaded files
working-directory: dist/
run: |
ls -R
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
dist/*.tar.gz
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
8 changes: 2 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
|python-versions| |github-build| |appveyor-build| |docs|
|python-versions| |github-build| |docs|

pyaaf2
======
Expand Down Expand Up @@ -52,14 +52,10 @@ TODO

.. |python-versions| image:: https://img.shields.io/badge/python-%3E%3D%202.7-blue.svg

.. |github-build| image:: https://github.com/markreidvfx/pyaaf2/actions/workflows/python-tests.yml/badge.svg
.. |github-build| image:: https://github.com/markreidvfx/pyaaf2/actions/workflows/workflow.yml/badge.svg
:alt: github actions
:target: https://github.com/markreidvfx/pyaaf2/actions

.. |appveyor-build| image:: https://ci.appveyor.com/api/projects/status/32r7s2skrgm9ubva?svg=true
:alt: appveyor build status
:target: https://ci.appveyor.com/project/markreidvfx/pyaaf2

.. |docs| image:: https://readthedocs.org/projects/pyaaf/badge/?version=latest
:alt: Documentation Status
:target: http://pyaaf.readthedocs.io/en/latest/?badge=latest

0 comments on commit 109078e

Please sign in to comment.