diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 17bd0e5..2e97b71 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,6 +36,14 @@ jobs: exit 1 fi fi + + - name: ensure version is not already released + run: | + if git ls-remote --tags origin | grep -q "refs/tags/$VERSION"; then + echo "Version $VERSION already exists" + exit 1 + fi + - name: configure git with the bot credentials run: | mkdir -p ~/.ssh @@ -58,6 +66,18 @@ jobs: git rev-parse --short HEAD + - name: bump version in version file + run: | + echo $VERSION > VERSION + working-directory: ./go-highs + + - name: commit version bump + run: | + git add VERSION + git commit -m "Bumping version to $VERSION" + git push origin ${{ github.ref_name }} + working-directory: ./go-highs + - name: push release tag run: | git tag $VERSION diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..b7c0a9b --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +v1.6.0 diff --git a/go.mod b/go.mod index e265f3e..1fd3c6d 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/nextmv-io/go-highs go 1.21 -require github.com/nextmv-io/go-mip v1.6.0 +require github.com/nextmv-io/go-mip v1.6.1 require ( github.com/sergi/go-diff v1.3.1 // indirect diff --git a/go.sum b/go.sum index cafb9d5..0713169 100644 --- a/go.sum +++ b/go.sum @@ -302,8 +302,8 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/nextmv-io/go-mip v1.6.0 h1:UULt5UcLvLLISWMcXBq+1Q+rO9eV9gUH15wT0dfCzZM= -github.com/nextmv-io/go-mip v1.6.0/go.mod h1:8kETFsctIoqHLo+YpBoo9QdXYvhxUxJzJzyCQaf6YLc= +github.com/nextmv-io/go-mip v1.6.1 h1:bIdLSuYu1L5P6BoKWA+Joiy6wCWrrEPYNi8ml7H4GKc= +github.com/nextmv-io/go-mip v1.6.1/go.mod h1:8kETFsctIoqHLo+YpBoo9QdXYvhxUxJzJzyCQaf6YLc= github.com/nextmv-io/sdk v1.8.0 h1:EqYibIyeaFRc9zgyPUUwbD2nx9z37l18YfJfVe1wHCU= github.com/nextmv-io/sdk v1.8.0/go.mod h1:Y48XLPcIOOxRgO86ICNpqGrH2N5+dd1TDNvef/FD2Kc= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= diff --git a/version.go b/version.go new file mode 100644 index 0000000..bd9fdbd --- /dev/null +++ b/version.go @@ -0,0 +1,16 @@ +// © 2019-present nextmv.io inc + +package highs + +import ( + _ "embed" + "strings" +) + +//go:embed VERSION +var version string + +// Version returns the version of the highs module. +func Version() string { + return strings.TrimSpace(version) +}