Package and push ontology to nuget.org #39
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: 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 |