Skip to content

Use correct api key name #5

Use correct api key name

Use correct api key name #5

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
jobs:
build-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore
run: dotnet restore ./Fable.Remoting.OpenApi.sln
- name: Build solution
run: dotnet build ./Fable.Remoting.OpenApi.sln -c Release --no-restore
- name: Test solution
run: dotnet test ./Fable.Remoting.OpenApi.sln -c Release --no-build
publish:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: build-test
env:
NUGET_API_KEY: ${{ secrets.NUGET_KEY }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore
run: dotnet restore ./Release.sln
- name: Pack
run: |
mkdir -p artifacts
dotnet pack ./Release.sln -c Release --no-restore -o artifacts
- name: Publish to NuGet
if: env.NUGET_API_KEY != ''
run: dotnet nuget push "artifacts/*.nupkg" --source https://api.nuget.org/v3/index.json --api-key "$NUGET_API_KEY" --skip-duplicate