mirror of
https://github.com/likelovewant/ollama-for-amd.git
synced 2025-12-21 22:33:56 +00:00
59 lines
2.1 KiB
YAML
59 lines
2.1 KiB
YAML
name: Upload Release Assets
|
|
|
|
on:
|
|
release:
|
|
types: [created]
|
|
|
|
jobs:
|
|
upload-release-assets:
|
|
runs-on: windows
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
# This step checks out the code from the repository to the runner.
|
|
|
|
# Assuming you already have compilation and packaging steps that generate the following files:
|
|
# dist/ollama-windows-amd64.7z
|
|
# dist/OllamaSetup.exe
|
|
|
|
- name: Get the version
|
|
id: get_version
|
|
run: |
|
|
echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
|
|
# This step extracts the version number from the tag name.
|
|
|
|
- name: Create Release
|
|
id: create_release
|
|
uses: actions/create-release@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tag_name: ${{ github.ref_name }}
|
|
release_name: Release ${{ github.ref_name }}
|
|
body: |
|
|
Description of the release goes here.
|
|
# draft: false (Uncomment if you want to create a non-draft release)
|
|
# prerelease: false (Uncomment if you want to create a non-prerelease version)
|
|
# This step creates a new release on GitHub.
|
|
|
|
- name: Upload ollama-windows-amd64.7z Release Asset
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: dist/ollama-windows-amd64.7z
|
|
asset_name: ollama-windows-amd64.7z
|
|
asset_content_type: application/x-7z-compressed
|
|
# This step uploads the .7z file as a release asset.
|
|
|
|
- name: Upload OllamaSetup.exe Release Asset
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: dist/OllamaSetup.exe
|
|
asset_name: OllamaSetup.exe
|
|
asset_content_type: application/vnd.microsoft.portable-executable
|
|
# This step uploads the .exe file as a release asset. |