Publish dotnet tool #31
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: Publish dotnet tool | |
# Basics from https://docs.microsoft.com/en-us/azure/dev-spaces/how-to/github-actions | |
on: | |
workflow_dispatch: | |
workflow_run: | |
workflows: ['Tests'] | |
types: [completed] | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '8' | |
- name: Build and Publish | |
run: | | |
dotnet restore | |
dotnet pack -c Release ./src/fhir-candle/fhir-candle.csproj | |
mv ./src/fhir-candle/bin/Release/net8.0/publish/wwwroot ./src/fhir-candle/bin/Release/net8.0/publish/staticwebassets | |
7z a ./nupkg/*.nupkg ./src/fhir-candle/bin/Release/net8.0/publish/staticwebassets/ | |
dotnet nuget push ./nupkg/*.nupkg --api-key ${{ secrets.GINOC_NUGET }} --source https://api.nuget.org/v3/index.json |