From 632efe802999164862f08e629e32afa6a7401a98 Mon Sep 17 00:00:00 2001 From: zu1k Date: Thu, 30 Jun 2022 18:04:38 +0800 Subject: [PATCH] fix: calc version out of docker Signed-off-by: zu1k --- .github/workflows/go-release.yml | 6 ++++-- .github/workflows/go.yml | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/go-release.yml b/.github/workflows/go-release.yml index af371d7..7b2541b 100644 --- a/.github/workflows/go-release.yml +++ b/.github/workflows/go-release.yml @@ -58,8 +58,9 @@ jobs: - name: Check out code uses: actions/checkout@v3 - - name: git config trust dir - run: git config --global --add safe.directory /github/workspace + - name: Get version + id: version + run: echo ::set-output name=version::${GITHUB_REF##*/v} - name: Publish AUR package nali-go uses: zu1k/aur-publish-action@master @@ -68,3 +69,4 @@ jobs: commit_username: 'zu1k' commit_email: 'i@zu1k.com' ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }} + new_release: ${{ steps.version.outputs.version }} diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 9b0013c..569fab5 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -33,8 +33,9 @@ jobs: - name: Check out code uses: actions/checkout@v3 - - name: git config trust dir - run: git config --global --add safe.directory /github/workspace + - name: Get version + id: version + run: echo ::set-output name=version::$(git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g') - name: Publish AUR package nali-go-git uses: zu1k/aur-publish-action@master @@ -43,3 +44,4 @@ jobs: commit_username: 'zu1k' commit_email: 'i@zu1k.com' ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }} + new_release: ${{ steps.version.outputs.version }}