-
Notifications
You must be signed in to change notification settings - Fork 30
54 lines (41 loc) · 1.37 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
name: TagTool Build
on:
push:
branches: [ "master" ]
jobs:
build:
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Determine Version
id: determine_version
run: |
$version = (git rev-parse --short=7 HEAD).Trim()
Write-Output "Version determined: $version"
Write-Host "::set-output name=version::$version"
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: Setup NuGet
uses: NuGet/[email protected]
- name: Install 7Zip
run: |
Invoke-WebRequest -Uri "https://www.7-zip.org/a/7z1900-x64.msi" -OutFile "$env:TEMP\7z.msi"
Start-Process -Wait -FilePath msiexec -ArgumentList "/i", "$env:TEMP\7z.msi", "/quiet"
- name: Restore Packages
run: nuget restore TagTool.sln
- name: Build solution
run: msbuild TagTool.sln -t:rebuild -property:Platform=x64 -property:Configuration=Release
- name: Zip Release
run: |
& "C:\Program Files\7-Zip\7z.exe" a release_x64.7z ./TagTool/bin/x64/Release/*
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: release_x64.7z
tag_name: ${{ steps.determine_version.outputs.version }}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}