fix usearch for iOS #197
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Version | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| jobs: | |
| set_version: | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.head_ref, 'release/') | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| token: ${{ github.token }} | |
| - name: Set VERSION | |
| run: | | |
| version="${GITHUB_HEAD_REF#release/}" | |
| echo $version > VERSION | |
| sed -i "s/\"version\": \".*\"/\"version\": \"${version#v}\"/" package.json | |
| sed -i "s/public static string Version = \".*\";/public static string Version = \"$version\";/" Runtime/LLMUnitySetup.cs | |
| sed -i "s/PROJECT_NUMBER *= *[^ ]*/PROJECT_NUMBER = $version/" .github/doxygen/Doxyfile | |
| git config --global user.name $GITHUB_ACTOR | |
| git config --global user.email [email protected] | |
| git add VERSION | |
| git add package.json | |
| git add Runtime/LLMUnitySetup.cs | |
| git add .github/doxygen/Doxyfile | |
| llamalibVersion=`cat Runtime/LLMUnitySetup.cs | grep LlamaLibVersion | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+'` | |
| sed -Ei "s:https\://github.com/undreamai/LlamaLib/releases/download/v[0-9]+\.[0-9]+\.[0-9]+/undreamai-v[0-9]+\.[0-9]+\.[0-9]+:https\://github.com/undreamai/LlamaLib/releases/download/$llamalibVersion/undreamai-$llamalibVersion:g" README.md | |
| git add README.md | |
| git commit -m "update VERSION" | |
| - name: Push changes | |
| uses: ad-m/github-push-action@master | |
| with: | |
| github_token: ${{ github.token }} | |
| branch: ${{ github.head_ref }} |