Skip to content

Commit

Permalink
first try new release action
Browse files Browse the repository at this point in the history
  • Loading branch information
jGaboardi committed Jun 25, 2021
1 parent d0040be commit 9897b7b
Showing 1 changed file with 36 additions and 28 deletions.
64 changes: 36 additions & 28 deletions .github/workflows/release_and_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,41 +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:
# 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: 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 }}

0 comments on commit 9897b7b

Please sign in to comment.