Skip to content

Commit

Permalink
export module name
Browse files Browse the repository at this point in the history
  • Loading branch information
Dawid Ciepiela committed Jan 26, 2024
1 parent 34692a0 commit eea875d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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
6 changes: 5 additions & 1 deletion .github/workflows/test_and_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 }}

0 comments on commit eea875d

Please sign in to comment.