From 4c2e2989efbc7f73ea58e537c4acb2216407defa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Segura=20Lucas?= Date: Fri, 25 Sep 2020 23:06:49 +0200 Subject: [PATCH] Fix release workflow --- .github/workflows/release_workflow.yaml | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release_workflow.yaml b/.github/workflows/release_workflow.yaml index 7e0e7e3..1af50d0 100644 --- a/.github/workflows/release_workflow.yaml +++ b/.github/workflows/release_workflow.yaml @@ -23,19 +23,18 @@ jobs: run: | python setup.py sdist python setup.py bdist_wheel - - name: Publish - uses: actions/upload-artifact@v2 - with: - name: Distribution files - path: dist/ + - name: Extract tag name + id: tag + run: | + echo ::set-output name=TAG::${GITHUB_REF#refs/tags/} - name: Create release id: create_release uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} + tag_name: ${{ steps.tag.outputs.TAG }} + release_name: Release ${{ steps.tag.outputs.TAG }} draft: false prerelease: false - name: Upload source distribution @@ -45,8 +44,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./dist/garage-door-controller-${{ github.ref }}.tar.gz - asset_name: garage-door-controller-${{ github.ref }}.tar.gz + asset_path: ./dist/garage-door-controller-${{ steps.tag.outputs.TAG }}.tar.gz + asset_name: garage-door-controller-${{ steps.tag.outputs.TAG }}.tar.gz asset_content_type: application/gzip - name: Upload wheel distribution id: upload-wheel-dist-asset @@ -55,9 +54,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./dist/garage-door-controller-${{ github.ref }}-py3-none-any.whl - asset_name: garage-door-controller-${{ github.ref }}-py3-none-any.whl + asset_path: ./dist/garage-door-controller-${{ steps.tag.outputs.TAG }}-py3-none-any.whl + asset_name: garage-door-controller-${{ steps.tag.outputs.TAG }}-py3-none-any.whl asset_content_type: application/zip - - -