diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1c6f2c4..eadfac0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -87,3 +87,25 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.PYPI_API_TOKEN }} + - name: Create release on GitHub + id: create_release + if: startsWith(github.ref, 'refs/tags') + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: ${{ github.ref }} + draft: false + prerelease: false + - name: Add sdist to release + id: upload-release-asset + if: startsWith(github.ref, 'refs/tags') + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./dist/git-pw-${{ github.ref }}.tar.gz + asset_name: git-pw-${{ github.ref }}.tar.gz + asset_content_type: application/gzip