Skip to content

Nightly Release to PowerShell Gallery #1800

Nightly Release to PowerShell Gallery

Nightly Release to PowerShell Gallery #1800

name: Nightly Release to PowerShell Gallery
on:
workflow_dispatch:
schedule:
- cron: '30 2 * * *'
permissions: read-all
jobs:
build:
runs-on: windows-latest
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.x
9.x
- uses: actions/checkout@v4
with:
ref: dev
token: ${{ secrets.PAT }}
- name: Build and Publish Module
env:
POWERSHELLGALLERY_API_KEY: ${{ secrets.POWERSHELLGALLERY_API_KEY }}
shell: pwsh
run: |
./build/Build-Nightly.ps1
- name: Set variables
shell: pwsh
run: |
$version = Get-Content version.txt -raw
"BUILDVERSION=$version" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
- name: Add & Commit
uses: EndBug/add-and-commit@v9
with:
message: 'Nightly publish to PowerShell Gallery'
tag: '${{env.BUILDVERSION}}-nightly --force'
push: true