release.yaml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480
  1. name: release
  2. on:
  3. push:
  4. tags:
  5. - 'v*'
  6. jobs:
  7. # Full build of the Mac assets
  8. build-darwin:
  9. runs-on: macos-12
  10. environment: release
  11. steps:
  12. - uses: actions/checkout@v4
  13. - name: Set Version
  14. shell: bash
  15. run: |
  16. echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
  17. echo "RELEASE_VERSION=$(echo ${GITHUB_REF_NAME} | cut -f1 -d-)" >> $GITHUB_ENV
  18. - name: key
  19. env:
  20. MACOS_SIGNING_KEY: ${{ secrets.MACOS_SIGNING_KEY }}
  21. MACOS_SIGNING_KEY_PASSWORD: ${{ secrets.MACOS_SIGNING_KEY_PASSWORD }}
  22. run: |
  23. echo $MACOS_SIGNING_KEY | base64 --decode > certificate.p12
  24. security create-keychain -p password build.keychain
  25. security default-keychain -s build.keychain
  26. security unlock-keychain -p password build.keychain
  27. security import certificate.p12 -k build.keychain -P $MACOS_SIGNING_KEY_PASSWORD -T /usr/bin/codesign
  28. security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k password build.keychain
  29. security set-keychain-settings -lut 3600 build.keychain
  30. - uses: actions/setup-go@v5
  31. with:
  32. go-version-file: go.mod
  33. cache: true
  34. - name: Build Darwin
  35. env:
  36. APPLE_IDENTITY: ${{ secrets.APPLE_IDENTITY }}
  37. APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
  38. APPLE_TEAM_ID: ${{ vars.APPLE_TEAM_ID }}
  39. APPLE_ID: ${{ vars.APPLE_ID }}
  40. SDKROOT: /Applications/Xcode_13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
  41. DEVELOPER_DIR: /Applications/Xcode_13.4.1.app/Contents/Developer
  42. run: |
  43. ./scripts/build_darwin.sh
  44. - uses: actions/upload-artifact@v4
  45. with:
  46. name: dist-darwin
  47. path: |
  48. dist/*arwin*
  49. !dist/*-cov
  50. # Windows builds take a long time to both install the dependencies and build, so parallelize
  51. # CPU generation step
  52. generate-windows-cpu:
  53. environment: release
  54. runs-on: windows
  55. env:
  56. KEY_CONTAINER: ${{ vars.KEY_CONTAINER }}
  57. steps:
  58. - uses: actions/checkout@v4
  59. - name: Set Version
  60. shell: bash
  61. run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
  62. - uses: 'google-github-actions/auth@v2'
  63. with:
  64. project_id: 'ollama'
  65. credentials_json: '${{ secrets.GOOGLE_SIGNING_CREDENTIALS }}'
  66. - run: echo "${{ vars.OLLAMA_CERT }}" > ollama_inc.crt
  67. - name: install Windows SDK 8.1 to get signtool
  68. run: |
  69. $ErrorActionPreference = "Stop"
  70. write-host "downloading SDK"
  71. Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/p/?LinkId=323507" -OutFile "${env:RUNNER_TEMP}\sdksetup.exe"
  72. Start-Process "${env:RUNNER_TEMP}\sdksetup.exe" -ArgumentList @("/q") -NoNewWindow -Wait
  73. write-host "Win SDK 8.1 installed"
  74. gci -path 'C:\Program Files (x86)\Windows Kits\' -r -fi 'signtool.exe'
  75. - name: install signing plugin
  76. run: |
  77. $ErrorActionPreference = "Stop"
  78. write-host "downloading plugin"
  79. Invoke-WebRequest -Uri "https://github.com/GoogleCloudPlatform/kms-integrations/releases/download/cng-v1.0/kmscng-1.0-windows-amd64.zip" -OutFile "${env:RUNNER_TEMP}\plugin.zip"
  80. Expand-Archive -Path "${env:RUNNER_TEMP}\plugin.zip" -DestinationPath ${env:RUNNER_TEMP}\plugin\
  81. write-host "Installing plugin"
  82. & "${env:RUNNER_TEMP}\plugin\*\kmscng.msi" /quiet
  83. write-host "plugin installed"
  84. - uses: actions/setup-go@v5
  85. with:
  86. go-version-file: go.mod
  87. cache: true
  88. - run: go get ./...
  89. - run: |
  90. $gopath=(get-command go).source | split-path -parent
  91. & "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\Launch-VsDevShell.ps1"
  92. cd $env:GITHUB_WORKSPACE
  93. $env:CMAKE_SYSTEM_VERSION="10.0.22621.0"
  94. $env:PATH="$gopath;$env:PATH"
  95. go generate -x ./...
  96. name: go generate
  97. - uses: actions/upload-artifact@v4
  98. with:
  99. name: generate-windows-cpu
  100. path: |
  101. llm/build/**/bin/*
  102. llm/build/**/*.a
  103. dist/windows-amd64/**
  104. # ROCm generation step
  105. generate-windows-rocm:
  106. environment: release
  107. runs-on: windows
  108. env:
  109. KEY_CONTAINER: ${{ vars.KEY_CONTAINER }}
  110. steps:
  111. - uses: actions/checkout@v4
  112. - name: Set Version
  113. shell: bash
  114. run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
  115. - uses: 'google-github-actions/auth@v2'
  116. with:
  117. project_id: 'ollama'
  118. credentials_json: '${{ secrets.GOOGLE_SIGNING_CREDENTIALS }}'
  119. - run: echo "${{ vars.OLLAMA_CERT }}" > ollama_inc.crt
  120. - name: install Windows SDK 8.1 to get signtool
  121. run: |
  122. $ErrorActionPreference = "Stop"
  123. write-host "downloading SDK"
  124. Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/p/?LinkId=323507" -OutFile "${env:RUNNER_TEMP}\sdksetup.exe"
  125. Start-Process "${env:RUNNER_TEMP}\sdksetup.exe" -ArgumentList @("/q") -NoNewWindow -Wait
  126. write-host "Win SDK 8.1 installed"
  127. gci -path 'C:\Program Files (x86)\Windows Kits\' -r -fi 'signtool.exe'
  128. - name: install signing plugin
  129. run: |
  130. $ErrorActionPreference = "Stop"
  131. write-host "downloading plugin"
  132. Invoke-WebRequest -Uri "https://github.com/GoogleCloudPlatform/kms-integrations/releases/download/cng-v1.0/kmscng-1.0-windows-amd64.zip" -OutFile "${env:RUNNER_TEMP}\plugin.zip"
  133. Expand-Archive -Path "${env:RUNNER_TEMP}\plugin.zip" -DestinationPath ${env:RUNNER_TEMP}\plugin\
  134. write-host "Installing plugin"
  135. & "${env:RUNNER_TEMP}\plugin\*\kmscng.msi" /quiet
  136. write-host "plugin installed"
  137. - uses: actions/setup-go@v5
  138. with:
  139. go-version-file: go.mod
  140. cache: true
  141. - name: 'Install ROCm'
  142. run: |
  143. $ErrorActionPreference = "Stop"
  144. write-host "downloading AMD HIP Installer"
  145. Invoke-WebRequest -Uri "https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-23.Q4-WinSvr2022-For-HIP.exe" -OutFile "${env:RUNNER_TEMP}\rocm-install.exe"
  146. write-host "Installing AMD HIP"
  147. Start-Process "${env:RUNNER_TEMP}\rocm-install.exe" -ArgumentList '-install' -NoNewWindow -Wait
  148. write-host "Completed AMD HIP"
  149. - name: 'Verify ROCm'
  150. run: |
  151. & 'C:\Program Files\AMD\ROCm\*\bin\clang.exe' --version
  152. - run: go get ./...
  153. - run: |
  154. $gopath=(get-command go).source | split-path -parent
  155. & "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\Launch-VsDevShell.ps1"
  156. cd $env:GITHUB_WORKSPACE
  157. $env:CMAKE_SYSTEM_VERSION="10.0.22621.0"
  158. $env:PATH="$gopath;$env:PATH"
  159. $env:OLLAMA_SKIP_CPU_GENERATE="1"
  160. $env:HIP_PATH=$(Resolve-Path 'C:\Program Files\AMD\ROCm\*\bin\clang.exe' | split-path | split-path)
  161. go generate -x ./...
  162. name: go generate
  163. - name: 'gather rocm dependencies'
  164. run: |
  165. $HIP_PATH=$(Resolve-Path 'C:\Program Files\AMD\ROCm\*\bin\clang.exe' | split-path | split-path)
  166. md "dist\deps\bin\rocblas\library"
  167. cp "${HIP_PATH}\bin\hipblas.dll" "dist\deps\bin\"
  168. cp "${HIP_PATH}\bin\rocblas.dll" "dist\deps\bin\"
  169. cp "${HIP_PATH}\bin\rocblas\library\*" "dist\deps\bin\rocblas\library\"
  170. - uses: actions/upload-artifact@v4
  171. with:
  172. name: generate-windows-rocm
  173. path: |
  174. llm/build/**/bin/*
  175. dist/windows-amd64/**
  176. - uses: actions/upload-artifact@v4
  177. with:
  178. name: windows-rocm-deps
  179. path: dist/deps/*
  180. # CUDA generation step
  181. generate-windows-cuda:
  182. environment: release
  183. runs-on: windows
  184. env:
  185. KEY_CONTAINER: ${{ vars.KEY_CONTAINER }}
  186. steps:
  187. - uses: actions/checkout@v4
  188. - name: Set Version
  189. shell: bash
  190. run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
  191. - uses: 'google-github-actions/auth@v2'
  192. with:
  193. project_id: 'ollama'
  194. credentials_json: '${{ secrets.GOOGLE_SIGNING_CREDENTIALS }}'
  195. - run: echo "${{ vars.OLLAMA_CERT }}" > ollama_inc.crt
  196. - name: install Windows SDK 8.1 to get signtool
  197. run: |
  198. $ErrorActionPreference = "Stop"
  199. write-host "downloading SDK"
  200. Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/p/?LinkId=323507" -OutFile "${env:RUNNER_TEMP}\sdksetup.exe"
  201. Start-Process "${env:RUNNER_TEMP}\sdksetup.exe" -ArgumentList @("/q") -NoNewWindow -Wait
  202. write-host "Win SDK 8.1 installed"
  203. gci -path 'C:\Program Files (x86)\Windows Kits\' -r -fi 'signtool.exe'
  204. - name: install signing plugin
  205. run: |
  206. $ErrorActionPreference = "Stop"
  207. write-host "downloading plugin"
  208. Invoke-WebRequest -Uri "https://github.com/GoogleCloudPlatform/kms-integrations/releases/download/cng-v1.0/kmscng-1.0-windows-amd64.zip" -OutFile "${env:RUNNER_TEMP}\plugin.zip"
  209. Expand-Archive -Path "${env:RUNNER_TEMP}\plugin.zip" -DestinationPath ${env:RUNNER_TEMP}\plugin\
  210. write-host "Installing plugin"
  211. & "${env:RUNNER_TEMP}\plugin\*\kmscng.msi" /quiet
  212. write-host "plugin installed"
  213. - uses: actions/setup-go@v5
  214. with:
  215. go-version-file: go.mod
  216. cache: true
  217. - name: 'Install CUDA'
  218. run: |
  219. $ErrorActionPreference = "Stop"
  220. write-host "downloading CUDA Installer"
  221. Invoke-WebRequest -Uri "https://developer.download.nvidia.com/compute/cuda/11.3.1/local_installers/cuda_11.3.1_465.89_win10.exe" -OutFile "${env:RUNNER_TEMP}\cuda-install.exe"
  222. write-host "Installing CUDA"
  223. Start-Process "${env:RUNNER_TEMP}\cuda-install.exe" -ArgumentList '-s' -NoNewWindow -Wait
  224. write-host "Completed CUDA"
  225. $cudaPath=((resolve-path "c:\Program Files\NVIDIA*\CUDA\v*\bin\nvcc.exe")[0].path | split-path | split-path)
  226. $cudaVer=($cudaPath | split-path -leaf ) -replace 'v(\d+).(\d+)', '$1_$2'
  227. echo "$cudaPath\bin" >> $env:GITHUB_PATH
  228. echo "CUDA_PATH=$cudaPath" >> $env:GITHUB_ENV
  229. echo "CUDA_PATH_V${cudaVer}=$cudaPath" >> $env:GITHUB_ENV
  230. echo "CUDA_PATH_VX_Y=CUDA_PATH_V${cudaVer}" >> $env:GITHUB_ENV
  231. - name: 'Verify CUDA'
  232. run: nvcc -V
  233. - run: go get ./...
  234. - name: go generate
  235. run: |
  236. $gopath=(get-command go).source | split-path -parent
  237. $cudabin=(get-command nvcc).source | split-path
  238. & "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\Launch-VsDevShell.ps1"
  239. cd $env:GITHUB_WORKSPACE
  240. $env:CMAKE_SYSTEM_VERSION="10.0.22621.0"
  241. $env:PATH="$gopath;$cudabin;$env:PATH"
  242. $env:OLLAMA_SKIP_CPU_GENERATE="1"
  243. go generate -x ./...
  244. - name: 'gather cuda dependencies'
  245. run: |
  246. $NVIDIA_DIR=(resolve-path 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\*\bin\')[0]
  247. md "dist\deps"
  248. cp "${NVIDIA_DIR}\cudart64_*.dll" "dist\deps\"
  249. cp "${NVIDIA_DIR}\cublas64_*.dll" "dist\deps\"
  250. cp "${NVIDIA_DIR}\cublasLt64_*.dll" "dist\deps\"
  251. - uses: actions/upload-artifact@v4
  252. with:
  253. name: generate-windows-cuda
  254. path: |
  255. llm/build/**/bin/*
  256. dist/windows-amd64/**
  257. - uses: actions/upload-artifact@v4
  258. with:
  259. name: windows-cuda-deps
  260. path: dist/deps/*
  261. # Import the prior generation steps and build the final windows assets
  262. build-windows:
  263. environment: release
  264. runs-on: windows
  265. needs:
  266. - generate-windows-cuda
  267. - generate-windows-rocm
  268. - generate-windows-cpu
  269. env:
  270. KEY_CONTAINER: ${{ vars.KEY_CONTAINER }}
  271. steps:
  272. - uses: actions/checkout@v4
  273. with:
  274. submodules: recursive
  275. - name: Set Version
  276. shell: bash
  277. run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
  278. - uses: 'google-github-actions/auth@v2'
  279. with:
  280. project_id: 'ollama'
  281. credentials_json: '${{ secrets.GOOGLE_SIGNING_CREDENTIALS }}'
  282. - run: echo "${{ vars.OLLAMA_CERT }}" > ollama_inc.crt
  283. - name: install Windows SDK 8.1 to get signtool
  284. run: |
  285. $ErrorActionPreference = "Stop"
  286. write-host "downloading SDK"
  287. Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/p/?LinkId=323507" -OutFile "${env:RUNNER_TEMP}\sdksetup.exe"
  288. Start-Process "${env:RUNNER_TEMP}\sdksetup.exe" -ArgumentList @("/q") -NoNewWindow -Wait
  289. write-host "Win SDK 8.1 installed"
  290. gci -path 'C:\Program Files (x86)\Windows Kits\' -r -fi 'signtool.exe'
  291. - name: install signing plugin
  292. run: |
  293. $ErrorActionPreference = "Stop"
  294. write-host "downloading plugin"
  295. Invoke-WebRequest -Uri "https://github.com/GoogleCloudPlatform/kms-integrations/releases/download/cng-v1.0/kmscng-1.0-windows-amd64.zip" -OutFile "${env:RUNNER_TEMP}\plugin.zip"
  296. Expand-Archive -Path "${env:RUNNER_TEMP}\plugin.zip" -DestinationPath ${env:RUNNER_TEMP}\plugin\
  297. write-host "Installing plugin"
  298. & "${env:RUNNER_TEMP}\plugin\*\kmscng.msi" /quiet
  299. write-host "plugin installed"
  300. - uses: actions/setup-go@v5
  301. with:
  302. go-version-file: go.mod
  303. cache: true
  304. - run: go get
  305. - uses: actions/download-artifact@v4
  306. with:
  307. name: generate-windows-cpu
  308. - uses: actions/download-artifact@v4
  309. with:
  310. name: generate-windows-cuda
  311. - uses: actions/download-artifact@v4
  312. with:
  313. name: windows-cuda-deps
  314. - uses: actions/download-artifact@v4
  315. with:
  316. name: windows-rocm-deps
  317. - uses: actions/download-artifact@v4
  318. with:
  319. name: generate-windows-rocm
  320. - run: dir llm/build
  321. - run: |
  322. $gopath=(get-command go).source | split-path -parent
  323. & "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\Launch-VsDevShell.ps1"
  324. cd $env:GITHUB_WORKSPACE
  325. $env:CMAKE_SYSTEM_VERSION="10.0.22621.0"
  326. $env:PATH="$gopath;$env:PATH"
  327. $env:OLLAMA_SKIP_GENERATE="1"
  328. & .\scripts\build_windows.ps1
  329. - uses: actions/upload-artifact@v4
  330. with:
  331. name: dist-windows
  332. path: |
  333. dist/OllamaSetup.exe
  334. dist/ollama-windows-*.zip
  335. # Linux x86 assets built using the container based build
  336. build-linux-amd64:
  337. environment: release
  338. runs-on: linux
  339. env:
  340. OLLAMA_SKIP_MANIFEST_CREATE: '1'
  341. BUILD_ARCH: amd64
  342. PUSH: '1'
  343. steps:
  344. - uses: actions/checkout@v4
  345. with:
  346. submodules: recursive
  347. - name: Set Version
  348. shell: bash
  349. run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
  350. - name: Login to Docker Hub
  351. uses: docker/login-action@v3
  352. with:
  353. username: ${{ vars.DOCKER_USER }}
  354. password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
  355. - run: |
  356. ./scripts/build_linux.sh
  357. ./scripts/build_docker.sh
  358. mv dist/deps/* dist/
  359. - uses: actions/upload-artifact@v4
  360. with:
  361. name: dist-linux-amd64
  362. path: |
  363. dist/*linux*
  364. !dist/*-cov
  365. # Linux ARM assets built using the container based build
  366. # (at present, docker isn't pre-installed on arm ubunutu images)
  367. build-linux-arm64:
  368. environment: release
  369. runs-on: linux-arm64
  370. env:
  371. OLLAMA_SKIP_MANIFEST_CREATE: '1'
  372. BUILD_ARCH: arm64
  373. PUSH: '1'
  374. steps:
  375. - uses: actions/checkout@v4
  376. with:
  377. submodules: recursive
  378. - name: Set Version
  379. shell: bash
  380. run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
  381. - name: 'Install Docker'
  382. run: |
  383. # Add Docker's official GPG key:
  384. env
  385. uname -a
  386. sudo apt-get update
  387. sudo apt-get install -y ca-certificates curl
  388. sudo install -m 0755 -d /etc/apt/keyrings
  389. sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
  390. sudo chmod a+r /etc/apt/keyrings/docker.asc
  391. # Add the repository to Apt sources:
  392. echo \
  393. "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
  394. $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  395. sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  396. sudo apt-get update
  397. sudo apt-get install -y docker-ce docker-ce-cli containerd.io
  398. sudo usermod -aG docker $USER
  399. sudo apt-get install acl
  400. sudo setfacl --modify user:$USER:rw /var/run/docker.sock
  401. - name: Login to Docker Hub
  402. uses: docker/login-action@v3
  403. with:
  404. username: ${{ vars.DOCKER_USER }}
  405. password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
  406. - run: |
  407. ./scripts/build_linux.sh
  408. ./scripts/build_docker.sh
  409. - uses: actions/upload-artifact@v4
  410. with:
  411. name: dist-linux-arm64
  412. path: |
  413. dist/*linux*
  414. !dist/*-cov
  415. # Aggregate all the assets and ship a release
  416. release:
  417. needs:
  418. - build-darwin
  419. - build-windows
  420. - build-linux-amd64
  421. - build-linux-arm64
  422. runs-on: linux
  423. environment: release
  424. permissions:
  425. contents: write
  426. env:
  427. OLLAMA_SKIP_IMAGE_BUILD: '1'
  428. PUSH: '1'
  429. GH_TOKEN: ${{ github.token }}
  430. steps:
  431. - uses: actions/checkout@v4
  432. - name: Set Version
  433. shell: bash
  434. run: |
  435. echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
  436. echo "RELEASE_VERSION=$(echo ${GITHUB_REF_NAME} | cut -f1 -d-)" >> $GITHUB_ENV
  437. - name: Login to Docker Hub
  438. uses: docker/login-action@v3
  439. with:
  440. username: ${{ vars.DOCKER_USER }}
  441. password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
  442. - run: ./scripts/build_docker.sh
  443. - name: Retrieve built artifact
  444. uses: actions/download-artifact@v4
  445. with:
  446. path: dist
  447. pattern: dist-*
  448. merge-multiple: true
  449. - run: |
  450. ls -lh dist/
  451. (cd dist; sha256sum * > sha256sum.txt)
  452. cat dist/sha256sum.txt
  453. - name: Create or update Release
  454. run: |
  455. echo "Looking for existing release for ${{ env.RELEASE_VERSION }}"
  456. OLD_TAG=$(gh release ls --json name,tagName | jq -r ".[] | select(.name == \"${{ env.RELEASE_VERSION }}\") | .tagName")
  457. if [ -n "$OLD_TAG" ]; then
  458. echo "Updating release ${{ env.RELEASE_VERSION }} to point to new tag ${GITHUB_REF_NAME}"
  459. gh release edit ${OLD_TAG} --tag ${GITHUB_REF_NAME}
  460. else
  461. echo "Creating new release ${{ env.RELEASE_VERSION }} pointing to tag ${GITHUB_REF_NAME}"
  462. gh release create ${GITHUB_REF_NAME} \
  463. --title ${{ env.RELEASE_VERSION }} \
  464. --draft \
  465. --generate-notes \
  466. --prerelease
  467. fi
  468. echo "Uploading artifacts for tag ${GITHUB_REF_NAME}"
  469. gh release upload ${GITHUB_REF_NAME} dist/* --clobber