chore: Code formatted #3
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: Publish to PowerShell Gallery | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
jobs: | |
build-and-publish: | |
runs-on: windows-latest | |
steps: | |
- name: 👨💻 Check-out code | |
uses: actions/checkout@v2 | |
- name: 👨🔧 Setup .NET Core SDK | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '6.0.x' | |
- name: 🔍 Enable problem matchers | |
run: echo "::add-matcher::.github/matchers/dotnet.json" | |
- name: 🦸♂️ Restore steriods | |
uses: actions/cache@v3 | |
with: | |
path: ~/.nuget/packages | |
# Look to see if there is a cache hit for the corresponding requirements file | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-nuget | |
- name: 🎒 Load packages | |
run: dotnet restore | |
- name: 🛠️ Build PowerShell module | |
run: dotnet build .\src\SvR.ContentPrep.Cmdlet -c Release -o .\dist\SvRooij.ContentPrep.Cmdlet | |
# - name: Analyses | |
# shell: pwsh | |
# run: | | |
# Import-Module .\dist\SvRooij.ContentPrep.Cmdlet\SvR.ContentPrep.Cmdlet.psd1 | |
# Install-Module -Name PSScriptAnalyzer | |
# Invoke-ScriptAnalyzer -Path .\dist\SvRooij.ContentPrep.Cmdlet\SvR.ContentPrep.Cmdlet.psd1 | |
# - name: Publish to PowerShell Gallery | |
# shell: pwsh | |
# run: | | |
# Import-Module .\dist\SvRooij.ContentPrep.Cmdlet\SvR.ContentPrep.Cmdlet.psd1 | |
# Install-Module -Name PowerShellGet -Force -SkipPublisherCheck | |
# Publish-Module -Path .\dist\SvRooij.ContentPrep.Cmdlet\ -NuGetApiKey ${{ secrets.PSGALLERY_API_KEY }} -Verbose | |
# - name: Publish to PowerShell Gallery | |
# uses: PowerShell/[email protected] | |
# with: | |
# PowerShellGalleryApiKey: ${{ secrets.PSGALLERY_API_KEY }} | |
# Path: './path/to/module' |