Skip to content

Commit

Permalink
Merge pull request #634 from jGaboardi/try_new_release_action
Browse files Browse the repository at this point in the history
Try new release action (softprops/action-gh-release)
  • Loading branch information
jGaboardi authored Jun 25, 2021
2 parents 0a9d5d5 + 9897b7b commit aad8cb6
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 27 deletions.
63 changes: 37 additions & 26 deletions .github/workflows/release_and_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: run Changelog
run: |
jupyter nbconvert --to notebook --execute --inplace --ExecutePreprocessor.timeout=-1 --ExecutePreprocessor.kernel_name=python3 tools/gitcount.ipynb
jupyter nbconvert --to notebook --execute --inplace --ExecutePreprocessor.timeout=-1 --ExecutePreprocessor.kernel_name=python3 tools/gitcount.ipynb
- name: cat Changelog
uses: pCYSl5EDgo/cat@master
Expand All @@ -42,38 +42,49 @@ jobs:
env:
TEXT: ${{ steps.changetxt.outputs.text }}

- name: create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # token is provided by GHA, DO NOT create
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: ${{ steps.changetxt.outputs.text }}
draft: false
prerelease: false

- name: get asset name
run: |
export PKG=$(ls dist/)
set -- $PKG
echo "name=$1" >> $GITHUB_ENV
- name: upload release asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
body_path: ${{ steps.changetxt.outputs.path }}
name: Release ${{ github.ref }}
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: dist/${{ env.name }}
asset_name: ${{ env.name }}
asset_content_type: application/zip

#- name: create release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # token is provided by GHA, DO NOT create
# with:
# tag_name: ${{ github.ref }}
# release_name: Release ${{ github.ref }}
# body: ${{ steps.changetxt.outputs.text }}
# draft: false
# prerelease: false
#
#- name: get asset name
# run: |
# export PKG=$(ls dist/)
# set -- $PKG
# echo "name=$1" >> $GITHUB_ENV
#
#- name: upload release asset
# id: upload-release-asset
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# # 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
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: dist/${{ env.name }}
# asset_name: ${{ env.name }}
# asset_content_type: application/zip

- name: publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}

2 changes: 1 addition & 1 deletion spaghetti/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "1.6.0"
__version__ = "1.6.0.post1"

"""
# `spaghetti` --- Spatial Graphs: Networks, Topology, & Inference
Expand Down

0 comments on commit aad8cb6

Please sign in to comment.