Skip to content

Commit e2ed13e

Browse files
Try to get all *packed* artifacts for release, but separately deploy just site
1 parent 18bdbfc commit e2ed13e

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

.github/workflows/deploy.yml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,31 +33,33 @@ jobs:
3333
- name: Checkout 🛎️
3434
uses: actions/checkout@v4
3535

36-
- name: Download Web artifact from latest successful build 🔻
36+
- name: Download Web artifact to site directory
3737
if: ${{ inputs.deployWeb }}
3838
uses: dawidd6/action-download-artifact@v6
3939
with:
4040
workflow: dotnet.yml
41-
branch: main
42-
name_pattern: ICSharpCode.CodeConverter.Web.*.zip
41+
branch: master
42+
name_is_regexp: true
43+
name: ICSharpCode\.CodeConverter\.Web\..*\.zip
4344
path: site
4445

4546
- name: Download release artifacts
4647
if: ${{ inputs.createRelease || inputs.publishNuget }}
4748
uses: dawidd6/action-download-artifact@v6
4849
with:
4950
workflow: dotnet.yml
50-
branch: main
51-
name_pattern: ICSharpCode.CodeConverter*
51+
branch: master
52+
name_is_regexp: true
53+
name: ICSharpCode\.CodeConverter.*\.(nupkg|vsix)$
5254
path: release-artifacts
53-
merge-multiple: true
55+
skip_unpack: true
5456

5557
- name: Extract build version from artifacts
5658
id: get_version
5759
if: ${{ inputs.createRelease }}
5860
shell: pwsh
5961
run: |
60-
$artifact = Get-ChildItem -Path release-artifacts -Filter "*.nupkg" | Select-Object -First 1
62+
$artifact = Get-ChildItem -Path release-artifacts -Filter "ICSharpCode.CodeConverter.*.nupkg" | Select-Object -First 1
6163
if ($artifact) {
6264
$version = $artifact.Name -replace '^ICSharpCode\.CodeConverter\.(.+)\.nupkg$', '$1'
6365
Write-Output "version=$version" >> $env:GITHUB_OUTPUT
@@ -91,14 +93,9 @@ jobs:
9193
if (-not $env:NUGET_API_KEY) { throw "nugetApiKey input is required when Publish NuGet is checked." }
9294
Write-Output "::add-mask::$env:NUGET_API_KEY"
9395
$source = "https://api.nuget.org/v3/index.json"
94-
$packages = @(
95-
"release-artifacts/ICSharpCode.CodeConverter.*.nupkg",
96-
"release-artifacts/ICSharpCode.CodeConverter.CodeConv.*.nupkg"
97-
)
98-
foreach ($pattern in $packages) {
99-
Get-ChildItem -Path $pattern -File | ForEach-Object {
100-
dotnet nuget push $_.FullName -k $env:NUGET_API_KEY -s $source --skip-duplicate
101-
}
96+
$packages = Get-ChildItem -Path release-artifacts -Filter "*.nupkg"
97+
foreach ($package in $packages) {
98+
dotnet nuget push $package.FullName -k $env:NUGET_API_KEY -s $source --skip-duplicate
10299
}
103100
104101
- name: Create GitHub release

0 commit comments

Comments
 (0)