Skip to content

Merge pull request #37 from kougen/fix/new-version #83

Merge pull request #37 from kougen/fix/new-version

Merge pull request #37 from kougen/fix/new-version #83

Workflow file for this run

name: CI-CD
on:
push:
tags:
- "*v*"
jobs:
deploy:
name: 'Build, Test & Deploy'
env:
BUILD_CONFIG: 'Release'
SOLUTION: './Modules.sln'
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Install .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.0.2
- name: Restore dependencies
run: nuget restore $env:SOLUTION
- name: Build
run: dotnet build $env:SOLUTION --configuration $env:BUILD_CONFIG --no-restore
- name: Run tests
run: dotnet test $env:SOLUTION /p:Configuration=$env:BUILD_CONFIG --no-restore --no-build --verbosity normal
- name: Pack Modules
shell: pwsh
run: '& .\dotnet-tools\PackPackages.ps1 -CustomProjectsFile .projects.conf'
- name: Push to NuGet Modules
shell: pwsh
run: '& .\dotnet-tools\PushPackages.ps1 -CustomProjectsFile .projects.conf -Source https://api.nuget.org/v3/index.json -ApiKey ${{secrets.NUGET_API_KEY}}'
- name: Push to GitHub Modules
shell: pwsh
run: '& .\dotnet-tools\PushPackages.ps1 -CustomProjectsFile .projects.conf -Source https://nuget.pkg.github.com/joshika39/index.json -ApiKey ${{secrets.GIT_API_KEY}}'