diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml index 1ed3f9b..639f491 100644 --- a/.github/workflows/build_and_release.yml +++ b/.github/workflows/build_and_release.yml @@ -37,6 +37,10 @@ jobs: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest && \ go install github.com/axw/gocov/gocov@latest + - name: Export Module Name + id: export_module_name + run: echo "MODULE_NAME=$(go mod edit -json | jq -r '.Module.Path')" >> "$GITHUB_OUTPUT" + - name: Run linters run: gofmt -s -d ./ && golangci-lint run -v @@ -48,7 +52,7 @@ jobs: coverageCommand: gocov test ./... -coverprofile=c.out coverageLocations: ./c.out:gocov debug: true - prefix: github.com/${{ github.repository }}/v2 + prefix: ${{ steps.export_module_name.outputs.MODULE_NAME }} - name: Precompile binaries and upload assets uses: cli/gh-extension-precompile@v1 @@ -57,4 +61,4 @@ jobs: go_version: ${{ matrix.go }} - name: Update code documentation - run: curl -fsSL https://proxy.golang.org/github.com/sarumaj/gh-gr/v2/@v/${{ github.ref_name }}.info + run: curl -fsSL https://proxy.golang.org/${{ steps.export_module_name.outputs.MODULE_NAME }}/@v/${{ github.ref_name }}.info diff --git a/.github/workflows/test_and_report.yml b/.github/workflows/test_and_report.yml index e1589a1..a639632 100644 --- a/.github/workflows/test_and_report.yml +++ b/.github/workflows/test_and_report.yml @@ -37,6 +37,10 @@ jobs: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest && \ go install github.com/axw/gocov/gocov@latest + - name: Export Module Name + id: export_module_name + run: echo "MODULE_NAME=$(go mod edit -json | jq -r '.Module.Path')" >> "$GITHUB_OUTPUT" + - name: Run linters run: gofmt -s -d ./ && golangci-lint run -v @@ -48,4 +52,4 @@ jobs: coverageCommand: gocov test ./... -coverprofile=c.out coverageLocations: ./c.out:gocov debug: true - prefix: github.com/${{ github.repository }}/v2 + prefix: ${{ steps.export_module_name.outputs.MODULE_NAME }}