test ci #116
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: ci | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "**" | |
paths: | |
- ".github/workflows/ci.yml" | |
- "tools/Builder/Build.csx" | |
- "tools/Linters/NamespaceLinter.csx" | |
- "src/**" | |
- "*.sln" | |
- "*.props" | |
pull_request: | |
branches: | |
- "**" | |
paths: | |
- ".github/workflows/ci.yml" | |
- "src/**" | |
- "*.sln" | |
- "*.props" | |
jobs: | |
build: | |
runs-on: windows-latest | |
env: | |
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages # NuGet CLI environment variables | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
7.0.x | |
8.0.x | |
cache: true | |
cache-dependency-path: '**/packages.lock.json' | |
- run: dotnet restore --locked-mode | |
- run: dotnet tool install -g dotnet-script | |
- id: build | |
run: dotnet script ./tools/Builder/Build.csx | |
- uses: moomiji/host-nuget-on-github@v1 | |
with: | |
base-uri: https://maaxyz.github.io/pkg/nuget/ | |
package-paths: nupkgs | |
feed-path: nuget | |
force: true | |
squash: true | |
repository: MaaXYZ/pkg | |
branch: main | |
token: ${{ secrets.PKG_TOKEN }} | |
lint: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0 | |
- run: dotnet tool install -g dotnet-script | |
- run: cd tools/Linters ; dotnet script ./NamespaceLinter.csx |