fix typo #145
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: Build Pipeline | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push events but only for the main branch | |
push: | |
branches: | |
- main | |
paths: | |
- 'src/**' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: windows-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: 'Checkout SdnDiagnostics' | |
uses: actions/checkout@v2 | |
with: | |
path: main | |
- name: 'Build SdnDiagnostics Module and Nuget Package' | |
run: | | |
Set-Location -Path .\main | |
& .\build.ps1 | |
shell: powershell | |
- name: 'Publish to Nuget Gallery' | |
run: | | |
nuget.exe push ".\main\out\packages\SdnDiagnostics.*.nupkg" -ApiKey ${{ secrets.NUGET_AUTH_TOKEN }} -Source https://api.nuget.org/v3/index.json | |
shell: powershell | |
- name: 'Publish to PowerShell Gallery' | |
run: | | |
$nuGet = Get-Item -Path ".\main\out\packages\SdnDiagnostics*.nupkg" | |
$zipFolder = Rename-Item -Path $nuGet.FullName -NewName "SdnDiagnostics.zip" -Force -PassThru | |
Expand-Archive -Path $zipFolder.FullName -Destination (Split-Path -Path $zipFolder.FullName -Parent) | |
Publish-Module -Path "$(Split-Path -Path $zipFolder.FullName -Parent)\SdnDiagnostics" -NuGetApiKey ${{ secrets.PSGALLERY_AUTH_TOKEN }} -SkipAutomaticTags | |
shell: powershell |