Skip to content

Commit 109078e

Browse files
committed
add publish action
1 parent 113e6d0 commit 109078e

File tree

2 files changed

+48
-6
lines changed

2 files changed

+48
-6
lines changed

.github/workflows/publish.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Debug information
12+
run: |
13+
echo 'sha: ${{ github.sha }}'
14+
echo 'ref: ${{ github.ref }}'
15+
16+
# This action will download the artifact for workflow runs that
17+
# happen for this actual commit (the commit that the tag points to).
18+
# It also restores the files timestamps.
19+
20+
- name: Download sdist from commit ${{ github.sha }}
21+
uses: dawidd6/action-download-artifact@v2
22+
with:
23+
workflow: workflow.yml
24+
workflow_conclusion: success
25+
commit: ${{ github.sha }}
26+
name: sdist
27+
path: dist
28+
29+
- name: Display structure of downloaded files
30+
working-directory: dist/
31+
run: |
32+
ls -R
33+
34+
- name: Release
35+
uses: softprops/action-gh-release@v1
36+
if: startsWith(github.ref, 'refs/tags/')
37+
with:
38+
files: |
39+
dist/*.tar.gz
40+
41+
42+
- name: Publish distribution 📦 to PyPI
43+
uses: pypa/gh-action-pypi-publish@release/v1
44+
with:
45+
user: __token__
46+
password: ${{ secrets.PYPI_API_TOKEN }}

README.rst

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
|python-versions| |github-build| |appveyor-build| |docs|
1+
|python-versions| |github-build| |docs|
22

33
pyaaf2
44
======
@@ -52,14 +52,10 @@ TODO
5252

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

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

59-
.. |appveyor-build| image:: https://ci.appveyor.com/api/projects/status/32r7s2skrgm9ubva?svg=true
60-
:alt: appveyor build status
61-
:target: https://ci.appveyor.com/project/markreidvfx/pyaaf2
62-
6359
.. |docs| image:: https://readthedocs.org/projects/pyaaf/badge/?version=latest
6460
:alt: Documentation Status
6561
:target: http://pyaaf.readthedocs.io/en/latest/?badge=latest

0 commit comments

Comments
 (0)