v0.1.0-beta.1 #3
Workflow file for this run
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: Release package | |
on: | |
release: | |
types: [published] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '8.x' # SDK Version to use. | |
- name: Build | |
run: dotnet build | |
-c Release | |
working-directory: .dotnet | |
- name: Test | |
run: dotnet test | |
--no-build | |
--configuration Release | |
--filter="TestCategory~Online" | |
--logger "trx;LogFileName=${{github.workspace}}/artifacts/test-results/full.trx" | |
env: | |
SECRET_VALUE: ${{ secrets.OPENAI_TOKEN }} | |
working-directory: .dotnet | |
# Pack the client nuget package and include urls back to the repository and release tag | |
- name: Pack | |
run: dotnet pack | |
--no-build | |
--configuration Release | |
--output "${{github.workspace}}/artifacts/packages" | |
/p:RepositoryUrl="https://github.com/${{ github.repository }}" | |
/p:PackageProjectUrl="https://github.com/${{ github.repository }}/tree/${{ github.event.release.tag_name }}" | |
working-directory: .dotnet | |
# Append the nuget package to the github release that triggered this workflow | |
- name: Upload release asset | |
run: gh release upload ${{ github.event.release.tag_name }} | |
${{github.workspace}}/artifacts/packages/*.nupkg | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: build-artifacts | |
path: ${{github.workspace}}/artifacts | |
- name: NuGet Autenticate | |
run: dotnet nuget add source | |
"https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" | |
--name "github" | |
--username ${{ github.actor }} | |
--password ${{ secrets.GITHUB_TOKEN }} | |
--store-password-in-clear-text | |
working-directory: .dotnet | |
- name: Publish | |
run: dotnet nuget push | |
${{github.workspace}}/artifacts/packages/*.nupkg | |
--source "github" | |
--api-key ${{ secrets.GITHUB_TOKEN }} | |
--skip-duplicate | |
working-directory: .dotnet | |