Skip to content

⬆️ Increment version for updated dependency #34

⬆️ Increment version for updated dependency

⬆️ Increment version for updated dependency #34

Workflow file for this run

name: .NET Core
on: push
jobs:
ci-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Build
run: dotnet build -c Release
- name: Test
run: dotnet publish -t:test
ci-windows:
runs-on: windows-latest
env:
gallerykey: ${{ secrets.gallerykey }}
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 2
- name: Module update check
id: is_module_update_test
shell: pwsh
run: |
Write-Host "::set-output name=is_module_update::$(@(git diff --name-only HEAD~ HEAD -- "$(Resolve-Path .\src\*\*.psd1)").Count -gt 0)"
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Build
run: dotnet build -c Release
- name: Test
run: dotnet publish -t:test
- name: Publish
if: success() && env.gallerykey && steps.is_module_update_test.outputs.is_module_update == 'True'
shell: pwsh
run: |
dotnet publish -c Release
$MSBuildProjectName = [io.path]::GetFileNameWithoutExtension("$(Resolve-Path ./src/*/*.fsproj)")
$env:PSModulePath -split ';' |
ForEach-Object {"$_/$MSBuildProjectName"} |
Where-Object {Test-Path $_ -Type Container} |
Remove-Item -Recurse -Force
Push-Location ./src/*/bin/Release/*/publish
Import-LocalizedData Module -FileName $MSBuildProjectName -BaseDirectory "$PWD"
$Version = $Module.ModuleVersion
$InstallPath = "$env:UserProfile/Documents/PowerShell/Modules/$MSBuildProjectName/$Version"
if(!(Test-Path $InstallPath -Type Container)) {mkdir $InstallPath}
Copy-Item * -Destination $InstallPath
Pop-Location
Publish-Module -Name $MSBuildProjectName -NuGetApiKey $env:gallerykey