From 75e20741893c7bce81ef3e9b764df465b3b32737 Mon Sep 17 00:00:00 2001 From: Mikhail Sveshnikov Date: Mon, 21 Nov 2022 09:38:02 +0300 Subject: [PATCH] Update check-test-release.yml (#493) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To be honest I just brainlessly copy-pasted https://github.com/iterative/shtab/pull/121, @casperdcl did I succeed? 😄 --- .github/workflows/check-test-release.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/check-test-release.yml b/.github/workflows/check-test-release.yml index 8825d3a4..a92d4846 100644 --- a/.github/workflows/check-test-release.yml +++ b/.github/workflows/check-test-release.yml @@ -153,12 +153,10 @@ jobs: echo ::set-output name=tag::${GITHUB_REF#refs/tags/} git log --pretty='format:%d%n- %s%n%b---' $(git tag --sort=v:refname | tail -n2 | head -n1)..HEAD > _CHANGES.md - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') - uses: softprops/action-gh-release@v1 + name: Release + run: | + changelog=$(git log --pretty='format:%d%n- %s%n%b---' $(git tag --sort=v:refname | tail -n2 | head -n1)..HEAD) + tag="${GITHUB_REF#refs/tags/}" + gh release create --title "mlem $tag beta" --draft --notes "$changelog" "$tag" dist/${{ steps.dist.outputs.whl }} dist/${{ steps.dist.outputs.targz }} env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - with: - name: tpi ${{ steps.meta.outputs.tag }} alpha - body_path: _CHANGES.md - draft: true - files: | - dist/${{ steps.dist.outputs.whl }}