Skip to content

Package and push ontology to nuget.org #39

Package and push ontology to nuget.org

Package and push ontology to nuget.org #39

Workflow file for this run

name: Package and push ontology to nuget.org
on:
workflow_dispatch:
release:
types:
- released
- prereleased
env:
NUGET_FEED_URL: https://api.nuget.org/v3/index.json
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: 'Setup Nuget'
uses: nuget/setup-nuget@v2
with:
nuget-api-key: ${{ secrets.NUGET_API_KEY }}
nuget-version: '5.x'
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Configure package generation directory
run: |
mkdir build
cp Metadata/Willow*.jsonld build/
cp Metadata/*.nuspec build/
cp Metadata/ReadMe.md build/
- name: 'Run nuget pack'
run: nuget pack build/*.nuspec -OutputDirectory build
- name: 'Publish to nuget.org'
run: nuget push build/*.nupkg -Source "${{ env.NUGET_FEED_URL }}" -SkipDuplicate