Skip to content

v0.11.0 - More utils! #42

v0.11.0 - More utils!

v0.11.0 - More utils! #42

Workflow file for this run

# thanks to https://github.com/SierraSoftworks/sierralib.api.views/blob/master/.github/workflows/package.yml for helping me figure this out
# GitHub's own documentation was a bit lacking.
name: Publish to NuGet
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the project
uses: actions/checkout@master
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.x'
- name: Setup nuget
uses: nuget/setup-nuget@v1
with:
nuget-version: 'latest'
- name: Test the package
run: dotnet test
env:
RELEASE_VERSION: ${{ github.event.release.tag_name }}
- name: Pack the thing up
run: |
cd CSharp.Nixill/
dotnet pack -o out
env:
RELEASE_VERSION: ${{ github.event.release.tag_name }}
- name: Push to github release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./CSharp.Nixill/out/Nixill.${{ github.event.release.tag_name }}.nupkg
asset_name: Nixill.${{ github.event.release.tag_name }}.nupkg
asset_content_type: application/zip
- name: Push to nuget.org
run: |
cd CSharp.Nixill
for f in ./out/*.nupkg
do
dotnet nuget push $f --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json
done