Skip to content

docs: update README for Firebird v6 snapshot support #12

docs: update README for Firebird v6 snapshot support

docs: update README for Firebird v6 snapshot support #12

Workflow file for this run

name: Publish PowerShell Module
description: Publish PSFirebird module to PowerShell Gallery
on:
push:
tags:
- 'v*.*.*'
workflow_dispatch:
jobs:
publish:
runs-on: windows-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Publish to PowerShell Gallery
shell: pwsh
env:
PSGALLERY_API_KEY: ${{ secrets.PSGALLERY_API_KEY }}
run: |
$ErrorActionPreference = 'Stop'
$tag = "${{ github.ref }}" -replace 'refs/tags/v', ''
Write-Host "Updating ModuleVersion to $tag"
$psd1 = 'PSFirebird.psd1'
(Get-Content $psd1) -replace "(?<=ModuleVersion\s*=\s*)'[^']+'", "'$tag'" | Set-Content $psd1
Write-Host "Publishing to PowerShell Gallery..."
try {
Publish-Module -Path '.' -NuGetApiKey $env:PSGALLERY_API_KEY -Verbose
} catch {
if ($_.Exception.Message -like "*is already available in the repository*") {
Write-Host "Version $tag is already published to PSGallery. Skipping."
} else {
throw
}
}
- name: Create GitHub Release
shell: pwsh
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
$release = gh release view "${{ github.ref_name }}" 2>$null
if ($LASTEXITCODE -eq 0) {
Write-Host "Release ${{ github.ref_name }} already exists. Skipping."
} else {
gh release create "${{ github.ref_name }}" --title "${{ github.ref_name }}" --generate-notes
}