Update CLI to openai branded library (#316) #375
This file contains 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: Build and Package CLI Tool | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- v* | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up .NET Core | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: '8.0.x' # Set the desired .NET version | |
- name: Set up environment variables | |
run: | | |
echo "BUILD_ARTIFACTSTAGINGDIRECTORY=$PWD/artifacts" >> $GITHUB_ENV | |
echo "AI_VERSION=1.0.${{ github.run_number }}" >> $GITHUB_ENV | |
echo "AI_VERSION_SUFFIX=alpha" >> $GITHUB_ENV | |
- name: Build and package CLI tool | |
id: build-package | |
run: | | |
dotnet build -c Release /p:VersionAssembly=${{ env.AI_VERSION }} /p:Version=${{ env.AI_VERSION }} /p:AssemblyVersion=${{ env.AI_VERSION }} /p:VersionSuffix=${{ env.AI_VERSION_SUFFIX }} --version-suffix ${{ env.AI_VERSION_SUFFIX }} | |
dotnet pack -c Release --output ${{env.BUILD_ARTIFACTSTAGINGDIRECTORY}} /p:Version=${{ env.AI_VERSION }} /p:PackageVersion=${{ env.AI_VERSION }} --version-suffix ${{ env.AI_VERSION_SUFFIX }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: cli-tool-artifacts | |
path: ${{env.BUILD_ARTIFACTSTAGINGDIRECTORY}} |