From acad638d81d11d236f65b526f2fcd4950173231b Mon Sep 17 00:00:00 2001 From: engigu Date: Mon, 29 Jan 2024 22:20:33 +0800 Subject: [PATCH] feat: support read site version from release tag --- .github/workflows/custom_deploy.yml | 7 +++++++ .github/workflows/demo_site_deploy.yml | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/.github/workflows/custom_deploy.yml b/.github/workflows/custom_deploy.yml index c17d571..6fed8c4 100644 --- a/.github/workflows/custom_deploy.yml +++ b/.github/workflows/custom_deploy.yml @@ -35,6 +35,13 @@ jobs: run: ls dist/ -la working-directory: web/ + - name: Get Release version + id: get_version + run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT + + - name: Update Local Version File + run: echo ${{ steps.get_version.outputs.VERSION }} > .release_version + - name: Install Go modules run: go mod tidy diff --git a/.github/workflows/demo_site_deploy.yml b/.github/workflows/demo_site_deploy.yml index fe404d5..1259f24 100644 --- a/.github/workflows/demo_site_deploy.yml +++ b/.github/workflows/demo_site_deploy.yml @@ -35,6 +35,13 @@ jobs: run: ls dist/ -la working-directory: web/ + - name: Get Release version + id: get_version + run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT + + - name: Update Local Version File + run: echo ${{ steps.get_version.outputs.VERSION }} > .release_version + - name: Install Go modules run: go mod tidy