-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (37 loc) · 1.18 KB
/
release.yml
File metadata and controls
52 lines (37 loc) · 1.18 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
name: Release to NuGet
on:
# workflow_run:
# workflows: ["Build Solution"]
# types:
# - completed
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*' # Push events to matching v1.0.0 tags
env:
PACKAGE_PROJECT_FILE_PATH: './CwAPI3D.Net.Bridge.sln'
NUSPEC_FILE_PATH: './CwAPI3D.Net.Bridge.nuspec'
BUILD_CONFIGURATION: Release
PLATFORM: x64
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: setup-msbuild
uses: microsoft/setup-msbuild@v2
with:
msbuild-architecture: 'x64'
- name: Build
run: |
msbuild ${{env.PACKAGE_PROJECT_FILE_PATH}} /p:Configuration=${{ env.BUILD_CONFIGURATION }} /p:Platform=${{ env.PLATFORM }}
- name: Setup NuGet
uses: NuGet/setup-nuget@v2.0.0
with:
nuget-version: 'latest'
- name: Pack
run: nuget pack ${{ env.NUSPEC_FILE_PATH }} # -OutputDirectory out -Verbosity detailed
- name: List files in out
run: ls -R out
- name: Push
run: nuget push .\*.nupkg -ApiKey ${{ secrets.NUGET_API_KEY }} -Source https://api.nuget.org/v3/index.json