publish.sh 521 B

1234567891011121314151617181920212223242526
  1. # Set your variables here.
  2. REPO="jmorganca/ollama"
  3. # Check if VERSION is set
  4. if [[ -z "${VERSION}" ]]; then
  5. echo "VERSION is not set. Please set the VERSION environment variable."
  6. exit 1
  7. fi
  8. OS=$(go env GOOS)
  9. ./script/build_${OS}.sh
  10. # Create a new tag if it doesn't exist.
  11. if ! git rev-parse v$VERSION >/dev/null 2>&1; then
  12. git tag v$VERSION
  13. fi
  14. git push origin v$VERSION
  15. # Create a new release.
  16. gh release create -p v$VERSION -t v$VERSION
  17. # Upload the zip file.
  18. gh release upload v$VERSION ./dist/* --clobber