[ci] Create lib git tag for go get during release (#182)

Signed-off-by: Julian Strobl <jmastr@mailbox.org>
This commit is contained in:
Julian Strobl 2023-11-16 11:04:46 +01:00 committed by GitHub
parent e36eb6c2a1
commit 6ef5e3c803
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,6 +34,12 @@ jobs:
fi fi
git tag ${{ github.event.inputs.tag }} git tag ${{ github.event.inputs.tag }}
git push origin ${{ 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 - name: Setup Go
uses: actions/setup-go@v4 uses: actions/setup-go@v4