From 6ef5e3c8030279f6f057b8f2269395a7a9de0a4f Mon Sep 17 00:00:00 2001 From: Julian Strobl Date: Thu, 16 Nov 2023 11:04:46 +0100 Subject: [PATCH] [ci] Create lib git tag for `go get` during release (#182) Signed-off-by: Julian Strobl --- .github/workflows/release.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9e9597c..49d8ff9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -34,6 +34,12 @@ jobs: fi git tag ${{ github.event.inputs.tag }} git push origin ${{ github.event.inputs.tag }} + # Create library git tag a la `lib/v0.1.1` for `go get` + LIB_TAG=$(grep "github.com/planetmint/planetmint-go/lib v[0-9]*\.[0-9]*\.[0-9]*" go.mod|sed "s#.*github.com/planetmint/planetmint-go/##g"|sed "s# #/#g") + if [[ $(git tag|grep ${LIB_TAG}|wc -l) -eq 0 ]]; then + git tag ${LIB_TAG} + git push origin ${LIB_TAG} + fi - name: Setup Go uses: actions/setup-go@v4