Update Gitea workflow to use public repository for module publishing
This commit is contained in:
@@ -22,9 +22,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
$creds = New-Object System.Management.Automation.PSCredential('actions', ('{{ secrets.PACKAGES_TOKEN }}' | ConvertTo-SecureString -AsPlainText -Force))
|
$creds = New-Object System.Management.Automation.PSCredential('actions', ('{{ secrets.PACKAGES_TOKEN }}' | ConvertTo-SecureString -AsPlainText -Force))
|
||||||
try {
|
try {
|
||||||
Register-PSRepository -Name 'GiteaPrivate' `
|
Register-PSRepository -Name 'GiteaPublic' `
|
||||||
-SourceLocation 'https://gitea.norwichct.tech/api/packages/cityofnorwich/nuget' `
|
-SourceLocation 'https://gitea.norwichct.tech/api/packages/public/nuget' `
|
||||||
-PublishLocation 'https://gitea.norwichct.tech/api/packages/cityofnorwich/nuget' `
|
-PublishLocation 'https://gitea.norwichct.tech/api/packages/public/nuget' `
|
||||||
-installationPolicy Trusted `
|
-installationPolicy Trusted `
|
||||||
-Credential $creds
|
-Credential $creds
|
||||||
}
|
}
|
||||||
@@ -56,7 +56,7 @@ jobs:
|
|||||||
Write-Host "Module version: $moduleVersion"
|
Write-Host "Module version: $moduleVersion"
|
||||||
$module = get-childItem -path . -Directory -Exclude ".*" | Select-Object -ExpandProperty Name
|
$module = get-childItem -path . -Directory -Exclude ".*" | Select-Object -ExpandProperty Name
|
||||||
Write-Host "Publishing module $module to Gitea"
|
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"
|
Write-Host "Module $module published to Gitea"
|
||||||
|
|
||||||
- name: Create draft release
|
- name: Create draft release
|
||||||
|
|||||||
Reference in New Issue
Block a user