-
Notifications
You must be signed in to change notification settings - Fork 175
67 lines (57 loc) · 1.85 KB
/
package.yml
File metadata and controls
67 lines (57 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Generate NuGet packages
on:
workflow_call:
inputs:
version_suffix:
required: false
type: string
default: "alpha.${{ github.run_number }}"
validate_version:
required: false
type: boolean
default: false
jobs:
package:
runs-on: ubuntu-latest
env:
DOTNET_CONFIGURATION: Release
steps:
- uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
8.0.x
9.0.x
10.0.x
- name: Get git tag
id: git_tag
run: "echo tag=${GITHUB_REF#refs/tags/v} >> $GITHUB_OUTPUT"
- name: Publish NuGet package
run: |
PACK_ARGS="-c ${{ env.DOTNET_CONFIGURATION }} -o ./nuget -p:CI=true"
if [ "${{ inputs.validate_version }}" = true ]; then
PACK_ARGS="$PACK_ARGS -p:PackageVersion=${{ steps.git_tag.outputs.tag }} -p:ReleaseBuild=true"
fi
if [ -n "${{ inputs.version_suffix }}" ]; then
PACK_ARGS="$PACK_ARGS -p:VersionSuffix=${{ inputs.version_suffix }}"
fi
dotnet pack $PACK_ARGS
- name: Publish NuGet packages as artifacts
uses: actions/upload-artifact@v5
with:
name: nuget-packages
path: ./nuget
- name: List NuGet packages in step summary
run: |
GITHUB_SUMMARY=$(find nuget -type f -name '*.nupkg' -exec basename {} \;)
echo "## NuGet packages:" >> $GITHUB_STEP_SUMMARY
echo "$GITHUB_SUMMARY" >> $GITHUB_STEP_SUMMARY
- name: Upload Package List
uses: actions/upload-artifact@v5
if: ${{ runner.os == 'linux' }}
with:
name: nuget-list
if-no-files-found: error
path: |
${{ github.workspace }}/.github/workflows/SignClientFileList.txt