-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (45 loc) · 1.77 KB
/
nexus.yml
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
name: "Build and push package with nexus"
on:
workflow_dispatch:
inputs:
packageVersion:
description: "Package Version"
required: true
type: string
env:
NUGET_REGISTRY: http://220.165.143.67:8081/repository/nuget-hosted/
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Echo build and push config info
run: |
echo "Nuget registry: $Nuget_Registry"
echo "Package version: $Package_Version"
env:
Nuget_Registry: ${{ env.NUGET_REGISTRY }}
Package_Version: ${{ inputs.packageVersion }}
- name: Checkout
uses: actions/checkout@v3
- name: Install dotnet tool
run: dotnet tool install -g dotnetCampus.TagToVersion
- name: Set tag to version
run: dotnet TagToVersion -t ${{ inputs.packageVersion }} -f Version.props
- name: Build and pack with dotnet
# run: dotnet build --configuration Release
run: |
./nuget-pack.ps1
shell: pwsh
- name: publish nuget package
uses: dansiegel/publish-nuget@v1.2
with:
filename: "./nupkg/*.nupkg"
apiKey: ${{ secrets.NexusNugetKey }}
feedUrl: ${{ env.NUGET_REGISTRY }}
# - name: Install Nuget
# uses: nuget/setup-nuget@v1
# with:
# nuget-version: "5.x"
# - name: Push package to Nexus registry
# run: |
# nuget push .\nupkg\*.nupkg -Source ${{ env.NUGET_REGISTRY }} -SkipDuplicate -ApiKey ${ { secrets.NexusNugetKey } } -NoSymbols