-
Notifications
You must be signed in to change notification settings - Fork 18
47 lines (36 loc) · 1.6 KB
/
workflowbuild.yml
File metadata and controls
47 lines (36 loc) · 1.6 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
name: Build and Package the workflow solution
on:
workflow_dispatch:
jobs:
build-and-package:
runs-on: windows-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: Build
run: msbuild ./Source/Workflow.sln -t:restore,build -property:Configuration=Release
# - name: Archive build artifacts
# uses: actions/upload-artifact@v3
# with:
# name: workflowhostwinservice
# path: ./Source/WorkflowHostWinService/bin/Release/net6.0-windows/win-x64
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: "5.5.0"
- name: Determine Build Version
id: gitversion
uses: gittools/actions/gitversion/[email protected]
- name: copy files to choco package
run: copy ./Source/WorkflowHostWinService/bin/Release/net6.0-windows/win-x64/* ./Source/Packaging/workflow/tools
- uses: nuget/setup-nuget@v1
- name: upload package
working-directory: ./Source/Packaging/workflow
run: |
nuget pack workflow.nuspec -Version ${{ steps.gitversion.outputs.semVer }}
dotnet nuget add source --username GITHUBUSERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/GITHUBUSERNAME/index.json"
dotnet nuget push "workflow.${{ steps.gitversion.outputs.semVer }}.nupkg" --api-key ${{ secrets.GITHUB_TOKEN }} --source "github"