-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (53 loc) · 1.71 KB
/
release.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Releases
on:
workflow_dispatch:
inputs:
tag:
description: Release Tag
required: true
default: dry-run
type: string
push:
tags:
- 'v*'
jobs:
build:
runs-on: windows-2019
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1
# Setup vstest
- name: Setup VSTest
uses: darenm/Setup-VSTest@v1
# Restore nuget packages
- name: Restore packages
run: nuget restore xlDuckDb.sln
# Build
- name: Build solution
run: msbuild xlDuckDb.sln -t:rebuild -property:Configuration=Release -property:ExcelDnaCreate32BitAddIn=false -property:ExcelDna64BitAddInSuffix= -property:RunExcelDnaPack=false -property:ExcelDna32BitAddInSuffix=32
# Run tests
- name: Unit test
run: vstest.console.exe /Platform:x64 .\UnitTests\bin\x64\Release\UnitTests.dll
# Upload binary
- name: "Upload binary"
uses: actions/upload-artifact@v4
with:
name: xlduckdb-${{ github.sha }}
path: .\xlDuckDb\bin\x64\Release\*.*
retention-days: 1
# Never mind that the previous step just did this...
- name: ZIP release artifact
run: zip -r xlduckdb-${{ github.sha }}.zip .\xlDuckDb\bin\x64\Release\*.*
# Create release
- name: GitHub release
id: release
run: gh release create ${{ github.ref }} "xlduckdb-${{ github.sha }}.zip" --generate-notes --notes-start-tag ${{ steps.previousTag.outputs.tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}