Skip to content

Update PowerDataOps.psm1 #7

Update PowerDataOps.psm1

Update PowerDataOps.psm1 #7

name: Publish PowerShell Module
on:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up PowerShell
uses: actions/setup-powershell@v2
- name: Update module version
run: |
$modulePath = "./PowerDataOps.psd1"
$module = Get-Content $modulePath | Out-String | ConvertFrom-StringData
$module.Version = [version]::new($module.Version.Major, $module.Version.Minor, $module.Version.Build + 1)
$module | Out-String | Set-Content $modulePath
- name: Publish to PSGallery
run: |
Publish-Module -Path "./path/to/your/module" -NuGetApiKey ${{ secrets.PS_GALLERY_KEY }}
env:
PS_GALLERY_KEY: ${{ secrets.PS_GALLERY_KEY }}