Skip to content

📝 Chore(Actions): Removed framework sdk. #35

📝 Chore(Actions): Removed framework sdk.

📝 Chore(Actions): Removed framework sdk. #35

name: Publish Packages
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
jobs:
build-on-ubuntu:
runs-on: ubuntu-latest
environment: Publish Packages
if: "contains(github.event.head_commit.message, '[Publish Packages]')"
steps:
- uses: actions/checkout@v3
with:
submodules: "true"
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
include-prerelease: false
- name: Add to GitHub Repo
run: |
nuget sources add -name github -Source https://nuget.pkg.github.com/Crequency/index.json -Username Crequency -Password ${{ secrets.GitHubToken }}
- name: Install NuGet
uses: nuget/setup-nuget@v1
with:
nuget-version: "6.x"
- name: Build and Publish `KitX.Contract.CSharp`
if: contains(github.event.head_commit.message, '[KitX.Contract.CSharp]') || contains(github.event.head_commit.message, '[All]')
run: |
cd "KitX Standard"
cd "KitX Contracts"
cd "KitX.Contract.CSharp"
dotnet build -c Release
nuget push ./bin/Release/*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NugetKey }} -NoSymbol
nuget push ./bin/Release/*.nupkg -Source github -SkipDuplicate
cd "../../.."
- name: Build and Publish `KitX.Web.Rules`
if: contains(github.event.head_commit.message, '[KitX.Web.Rules]') || contains(github.event.head_commit.message, '[All]')
run: |
cd "KitX Standard"
cd "KitX Rules"
cd "KitX.Web.Rules"
dotnet build -c Release
nuget push ./bin/Release/*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NugetKey }} -NoSymbol
nuget push ./bin/Release/*.nupkg -Source github -SkipDuplicate
cd "../../.."
- name: Build and Publish `KitX.KXP.Helper`
if: contains(github.event.head_commit.message, '[KitX.KXP.Helper]') || contains(github.event.head_commit.message, '[All]')
run: |
cd "KitX Standard"
cd "KitX File Formats"
cd "KitX.File.Format.KXP"
dotnet build -c Release
nuget push ./bin/Release/*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NugetKey }} -NoSymbol
nuget push ./bin/Release/*.nupkg -Source github -SkipDuplicate
cd "../../.."
- name: Build and Publish `KitX.KXP.Tool`
if: contains(github.event.head_commit.message, '[KitX.KXP.Tool]') || contains(github.event.head_commit.message, '[All]')
run: |
cd "KitX SDK"
cd "KitX.KXP.Tool"
dotnet build -c Release
nuget push ./bin/Release/*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NugetKey }} -NoSymbol
nuget push ./bin/Release/*.nupkg -Source github -SkipDuplicate
cd "../.."
- name: Build and Publish `KitX.Struct.Producer`
if: contains(github.event.head_commit.message, '[KitX.Struct.Producer]') || contains(github.event.head_commit.message, '[All]')
run: |
cd "KitX SDK"
cd "KitX.Struct.Producer"
dotnet build -c Release
nuget push ./bin/Release/*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NugetKey }} -NoSymbol
nuget push ./bin/Release/*.nupkg -Source github -SkipDuplicate
cd "../.."