-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (55 loc) · 2.12 KB
/
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Build
on:
pull_request:
workflow_dispatch:
inputs:
publish_nuget:
description: 'Publish nuget package?'
required: true
default: false
type: boolean
jobs:
Build:
runs-on: windows-latest
steps:
- uses: actions/[email protected]
with:
submodules: 'true'
- uses: microsoft/setup-msbuild@v1
- name: Build x86
run: |
mkdir build-x86
cd build-x86
cmake ..\ -A Win32 "-DCMAKE_SYSTEM_VERSION=10.0.19041.0"
cmake --build . --config Release
- name: Build Arm64
run: |
mkdir build-Arm64
cd build-Arm64
cmake ..\ -A Arm64 "-DCMAKE_SYSTEM_VERSION=10.0.19041.0"
cmake --build . --config Release
- name: Build x64
run: |
mkdir build-x64
cd build-x64
cmake ..\ -A x64 "-DCMAKE_SYSTEM_VERSION=10.0.19041.0"
cmake --build . --config Release
- name: Build 7Zap.NET
run: |
msbuild 7Zap\dirs.proj -restore -p:FullVersion=23.01.${{ github.run_number }}
- name: Nuget pack
run: |
nuget pack 7Zap\Nuget\7Zap.nuspec -Version 23.01.${{ github.run_number }} -BasePath "${{ github.workspace }}" -NonInteractive -Properties "src_root=.;build_x64=build-x64;build_x86=build-x86;build_arm64=build-Arm64;config=Release"
- uses: actions/[email protected]
with:
name: 7Zap
path: |
7Zap.*.nupkg
- name: Publish nuget packages to github and nuget.org
if: ${{ github.event.inputs.publish_nuget == 'true' }}
run: |
dotnet nuget add source --username ${{ github.actor }} --password ${{ secrets.TAGGER_PAT }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
dotnet nuget push 7Zap.*.nupkg --api-key ${{ secrets.TAGGER_PAT }} --source github
dotnet nuget push 7Zap.*.nupkg --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json
git tag "v23.01.${{ github.run_number }}"
git push --tags