Update publish-analysis.yml

This commit is contained in:
Dev Singh 2020-10-09 18:35:48 +00:00 committed by GitHub
parent 764dab01f6
commit 6987adf5b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,8 +4,9 @@
name: Upload Analysis Package
on:
release:
types: [published, edited]
push:
tags:
- 'v*'
jobs:
deploy:
@ -34,3 +35,24 @@ jobs:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
packages_dir: analysis-master/dist/
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: See PyPI
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: analysis-master/dist/tra_analysis-${{ github.ref }}-py3-none-any.whl
asset_name: ${{ github.ref }}
asset_content_type: application/octet-stream