From 9897b7b5adcf494c35b2fde50e6877bd5aac5533 Mon Sep 17 00:00:00 2001 From: James Gaboardi Date: Fri, 25 Jun 2021 12:37:45 -0400 Subject: [PATCH] first try new release action --- .github/workflows/release_and_publish.yml | 64 +++++++++++++---------- 1 file changed, 36 insertions(+), 28 deletions(-) diff --git a/.github/workflows/release_and_publish.yml b/.github/workflows/release_and_publish.yml index b18ad0bb..284480ac 100644 --- a/.github/workflows/release_and_publish.yml +++ b/.github/workflows/release_and_publish.yml @@ -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 }} -