Skip to content

Commit

Permalink
Update Github Action
Browse files Browse the repository at this point in the history
  • Loading branch information
aiqinxuancai committed Dec 22, 2023
1 parent fbd4673 commit 9618c4e
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 deletions.
44 changes: 44 additions & 0 deletions ChatGPTSharp/.github/workflows/pack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build and Publish NuGet on Tag

on:
push:
tags:
- '*'

jobs:
build-and-publish:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2

- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.*'

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore

- name: Pack
run: dotnet pack --configuration Release --no-build -o nupkgs

- name: Determine Pre-release Status
id: prerelease
run: |
if [[ ${{ github.ref }} == *"alpha"* ]]; then
echo "##[set-output name=status;]true"
else
echo "##[set-output name=status;]false"
fi
- name: Publish to GitHub Releases
uses: softprops/action-gh-release@v1
with:
files: nupkgs/*.nupkg
prerelease: ${{ steps.prerelease.outputs.status }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions ChatGPTSharp/ChatGPTSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<TargetFrameworks>netstandard2.1;netstandard2.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<Description>This project supports the real ChatGPT model "gpt-3.5-turbo", and the previous generation model "text-davinci-003", both with continuous dialog capability.</Description>
<Description>Supports GPT-4V, GPT-3.5 models; auto-calculates request tokens; enables continuous dialogues with conversation IDs; now includes Vision model image sending.</Description>
<PackageProjectUrl>https://github.com/aiqinxuancai/ChatGPTSharp</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryUrl>https://github.com/aiqinxuancai/ChatGPTSharp</RepositoryUrl>
<PackageTags>chatgpt;openai</PackageTags>
<Title>ChatGPTSharp</Title>
<VersionPrefix Condition=" '$(VersionPrefix)' == '' ">1.1.4</VersionPrefix>
<VersionPrefix Condition=" '$(VersionPrefix)' == '' ">2.0.0-alpha.2</VersionPrefix>
<UserSecretsId>4c177d5f-4337-454e-895d-41b94b987a07</UserSecretsId>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
</PropertyGroup>
Expand Down

0 comments on commit 9618c4e

Please sign in to comment.