From d1f522ccadeddf9e2c837db181856b4cc2a1b2f4 Mon Sep 17 00:00:00 2001 From: ipcjs Date: Sat, 26 Mar 2022 20:40:23 +0800 Subject: [PATCH] extract tag --- .github/workflows/build.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5976f76..4efee7b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -20,12 +20,19 @@ jobs: - name: Build run: make zhwiki.dict zhwiki.dict.yaml + - name: Extract tag name + id: tag + run: | + version_line=$(cat Makefile | grep 'VERSION=' -m 1) + echo "::set-output name=result::${version_line#VERSION=}" + - name: Release uses: ncipollo/release-action@v1 with: token: ${{ secrets.GITHUB_TOKEN }} artifacts: "zhwiki.dict,zhwiki.dict.yaml" commit: ${{ github.sha }} + tag: ${{ steps.tag.outputs.result }}