Skip to content

Commit 838cc93

Browse files
committed
release job
1 parent 5f9af3e commit 838cc93

File tree

1 file changed

+4
-21
lines changed

1 file changed

+4
-21
lines changed

.github/workflows/packages.yml

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,11 @@ jobs:
5757
needs: prepare
5858
env:
5959
ARTIFACT_FOLDER: "${{ github.workspace }}/nuget"
60-
VERSION: "${{ needs.prepare.output.VERSION }}"
6160
steps:
6261
- name: Checkout
6362
uses: actions/checkout@v1
6463
- name: Setup GitVersion
65-
run: |
66-
dotnet tool install gitversion.tool -g
67-
dotnet-gitversion
64+
run: dotnet tool install gitversion.tool -g
6865
- name: Download a Build Artifact
6966
uses: actions/[email protected]
7067
with:
@@ -76,41 +73,26 @@ jobs:
7673
TOKEN: ${{ secrets.GITHUB_TOKEN }}
7774
run: |
7875
$NugetVersionV2=& dotnet-gitversion . /showvariable NuGetVersionV2
79-
echo "Deploying [SharpNinja.Extensions.WindowsAppSdkHost.${NuGetVersionV2}.symbols.nupkg] from [$env:ARTIFACT_FOLDER]"
8076
$githubUrl="https://nuget.pkg.github.com/OWNER/index.json"
8177
& dotnet nuget add source --username sharpninja --password $env:TOKEN --store-password-in-clear-text --name github $githubUrl
8278
$nupkgs = GCI SharpNinja.Extensions.WindowsAppSdkHost.${NuGetVersionV2}.symbols.nupkg -Path $env:ARTIFACT_FOLDER -ErrorAction Stop -Verbose
8379
$nupkgs | foreach-object -Verbose -process { `
8480
& dotnet nuget push "$_" -k "$env:TOKEN" --source github --skip-duplicate
8581
}
86-
# - name: GitHub Packages
87-
# uses: tanaka-takayoshi/[email protected]
88-
# with:
89-
# # Path of NuPkg
90-
# nupkg-path: '${{ env.ARTIFACT_FOLDER }}/SharpNinja.Extensions.WindowsAppSdkHost.${{ env.NuGetVersionV2 }}.symbols.nupkg'
91-
# # package repository owner
92-
# repo-owner: sharpninja
93-
# # user account
94-
# gh-user: sharpninja
95-
# # access token
96-
# token: ${{ secrets.GITHUB_TOKEN }}
97-
# # skip publishing duplicated package(s)
98-
# skip-duplicate: true
9982
10083
publish-to-nuget:
10184
runs-on: windows-2022
10285
if: ${{ github.event_name == 'release' }}
10386
needs: prepare
10487
env:
10588
ARTIFACT_FOLDER: "${{ github.workspace }}/nuget"
106-
VERSION: "${{ needs.prepare.output.VERSION }}"
10789
steps:
10890
- name: Download a Build Artifact
10991
uses: actions/[email protected]
11092
with:
11193
name: artifacts
11294
- name: Event
113-
env:
95+
env:
11496
event_name: ${{ github.event_name }}
11597
run: echo "event_name $env:event_name"
11698

@@ -123,7 +105,8 @@ jobs:
123105
env:
124106
nuget_token: ${{ secrets.NUGET_TOKEN }}
125107
run: |
126-
$nupkgs = GCI *.symbols.nupkg -Path $env:ARTIFACT_FOLDER -ErrorAction Stop -Verbose
108+
$NugetVersionV2=& dotnet-gitversion . /showvariable NuGetVersionV2
109+
$nupkgs = GCI SharpNinja.Extensions.WindowsAppSdkHost.${NuGetVersionV2}.symbols.nupkg -Path $env:ARTIFACT_FOLDER -ErrorAction Stop -Verbose
127110
$nupkgs | foreach-object -Verbose -process { `
128111
& dotnet nuget push "$_" -k "$env:NUGET_TOKEN" --source "https://api.nuget.org/v3/index.json" --skip-duplicate
129112
}

0 commit comments

Comments
 (0)