Update Gitea workflow to use public repository for module publishing

This commit is contained in:
2025-03-12 12:20:12 -04:00
parent e38aad86f8
commit e9d6aa255f

View File

@@ -22,9 +22,9 @@ jobs:
run: |
$creds = New-Object System.Management.Automation.PSCredential('actions', ('{{ secrets.PACKAGES_TOKEN }}' | ConvertTo-SecureString -AsPlainText -Force))
try {
Register-PSRepository -Name 'GiteaPrivate' `
-SourceLocation 'https://gitea.norwichct.tech/api/packages/cityofnorwich/nuget' `
-PublishLocation 'https://gitea.norwichct.tech/api/packages/cityofnorwich/nuget' `
Register-PSRepository -Name 'GiteaPublic' `
-SourceLocation 'https://gitea.norwichct.tech/api/packages/public/nuget' `
-PublishLocation 'https://gitea.norwichct.tech/api/packages/public/nuget' `
-installationPolicy Trusted `
-Credential $creds
}
@@ -56,7 +56,7 @@ jobs:
Write-Host "Module version: $moduleVersion"
$module = get-childItem -path . -Directory -Exclude ".*" | Select-Object -ExpandProperty Name
Write-Host "Publishing module $module to Gitea"
Publish-Module -Path $module -Repository 'GiteaPrivate' -NuGetApiKey "${{ secrets.PACKAGES_TOKEN }}"
Publish-Module -Path $module -Repository 'GiteaPublic' -NuGetApiKey "${{ secrets.PACKAGES_TOKEN }}"
Write-Host "Module $module published to Gitea"
- name: Create draft release