From 5c582e6f27e197e2de1852ec7e39af5b853e9e99 Mon Sep 17 00:00:00 2001 From: Joe Reuss Date: Tue, 16 Jan 2024 15:03:21 -0600 Subject: [PATCH] Allow goreleaser to have version for tests --- .github/workflows/test.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2e16605da..31ed99c58 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -59,6 +59,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v3 + with: + fetch-tags: true - uses: actions/setup-node@v4 with: node-version: 20 @@ -115,6 +117,9 @@ jobs: - name: Add coverage information to action summary if: github.event_name == 'pull_request' run: echo 'Code coverage ' ${{steps.cc.outputs.cc_total}}'% Prev ' ${{steps.cc_b.outputs.cc_base_total}}'%' >> $GITHUB_STEP_SUMMARY + - name: Get current version + id: get_version + run: echo "::set-output name=version::$(git describe --tags --abbrev=0)" - name: Run GoReleaser for Ubuntu uses: goreleaser/goreleaser-action@v4 with: @@ -122,6 +127,8 @@ jobs: distribution: goreleaser version: latest args: --clean --snapshot + env: + VERSION: ${{ steps.get_version.outputs.version }} - name: Copy files (Ubuntu) run: | cp dist/pelican_linux_amd64_v1/pelican ./