forked from wixtoolset/wix3
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (41 loc) · 2.09 KB
/
wix3-build.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
name: WiX3
on:
workflow_dispatch:
inputs:
publish_nuget:
description: 'Publish nuget package?'
required: true
default: false
type: boolean
env:
SKIP_VS_CHECK: 'true'
OFFICIAL_WIX_BUILD: '${{ github.workspace }}\psw-wix.snk'
jobs:
WiX3-Build:
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
- uses: microsoft/setup-msbuild@v2
- name: Decrypt snk
run: gpg --quiet --batch --yes --decrypt --passphrase="${{ secrets.GPG_PASSPHRASE }}" --output "${{ github.workspace }}\psw-wix.snk" "${{ github.workspace }}\psw-wix.snk.gpg"
- name: Set version number
run: |
$version = "3.15.0-a"+$($Env:GITHUB_RUN_NUMBER)
echo $version
echo "NUPKG_VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
- name: Build
run: msbuild wix.proj -p:Configuration=Release
- name: Create nuget package
run: nuget.exe pack "${{ github.workspace }}\src\Setup\Nupkg\WiX.nuspec" -Version "${{ env.NUPKG_VERSION }}" -BasePath "${{ github.workspace }}" -OutputDirectory "${{ github.workspace }}\build\nuget-out"
- uses: actions/[email protected]
with:
name: nuget
path: ${{ github.workspace }}\build\nuget-out\PanelSW.Custom.WiX.${{ env.NUPKG_VERSION }}.nupkg
- name: Publish nuget package to github and nuget.org
if: ${{ github.event.inputs.publish_nuget == 'true' }}
run: |
dotnet nuget add source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
dotnet nuget push build\nuget-out\PanelSW.Custom.WiX.${{ env.NUPKG_VERSION }}.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source github
dotnet nuget push build\nuget-out\PanelSW.Custom.WiX.${{ env.NUPKG_VERSION }}.nupkg --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json
git tag v${{ env.NUPKG_VERSION }}
git push --tags