Skip to content

[FEAT] Filesystem first-class support #20

[FEAT] Filesystem first-class support

[FEAT] Filesystem first-class support #20

Workflow file for this run

name: ci
on:
create:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
package-and-publish-lib:
strategy:
matrix:
name: [ base, extra, console, filesystem, tools ]
include:
- name: base
libName: NekoLib
- name: extra
libName: NekoLib.Extra
- name: console
libName: NekoLib.Console
- name: filesystem
libName: NekoLib.Filesystem
- name: tools
libName: NekoLib.Tools
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Restore dependencies
run: dotnet restore ${{matrix.libName}}
- name: Build
run: dotnet build -c Release --no-restore ${{matrix.libName}}
- name: Generate NuGet package
run: |
dotnet pack ${{matrix.libName}}/ \
--configuration Release \
-p:RepositoryUrl=${{github.repositoryUrl}} \
--output nuget --no-restore --no-build
- name: upload NuGet Package As Artifact
uses: actions/upload-artifact@v4
with:
name: ${{matrix.libName}}
path: nuget/*
- name: publish to NuGet
if: startsWith(github.ref, 'refs/tags/')
run: |
dotnet nuget push \
nuget/* \
--api-key ${{secrets.NUGET_API_KEY}} \
-s https://api.nuget.org/v3/index.json