From 82a7ad9c0ca80b19d802b2372175368f1dfaf206 Mon Sep 17 00:00:00 2001 From: Kevin Lane Date: Sun, 22 Dec 2019 06:30:21 -0800 Subject: [PATCH] Add step to get tag name in release workflow --- .github/workflows/release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 556d829..6ca0706 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,10 +12,14 @@ jobs: steps: - name: Checkout uses: actions/checkout@v1 + - name: Get tag + id: tag + run: | + echo ::set-output name=tag::${GITHUB_REF#refs/tags/v} - name: Get changes id: changelog run: | - pattern='0,/${GITHUB_REF#refs/tags/v}/d;/[0-9]\+\.[0-9]\+\.[0-9]\+/Q' + pattern='0,/${{ steps.tag.outputs.tag }}/d;/[0-9]\+\.[0-9]\+\.[0-9]\+/Q' echo ::set-output name=changelog::$(sed $pattern CHANGELOG.md | head -n -1 | tail -n +2) - name: Create release uses: actions/create-release@master