This repository has been archived by the owner on Dec 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
77 lines (64 loc) · 1.78 KB
/
msbuild.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Build and Release
on:
push:
tags:
- "v*.*.*"
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up MSVC
uses: microsoft/[email protected]
- name: Build .lib file
run: |
msbuild /p:Configuration=Release /t:RegistryHelper /p:Platform=x64 RegistryHelper.sln
- name: Upload to Release
uses: actions/upload-artifact@v2
with:
name: lib-artifact
path: |
RegistryHelper/RegistryHelper.h
x64/Release/RegistryHelper.lib
x64/Release/RegistryHelper.pdb
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Git
run: git fetch --tags
- name: Display release version
run: |
echo "Release version: ${{ env.TAG }}"
- name: Download Artifact
uses: actions/download-artifact@v2
with:
name: lib-artifact
path: x64/Release
- name: Generate SHA256 hashes
id: hashes
run: |
cd "${GITHUB_WORKSPACE}/x64/Release"
hashes=""
for file in *; do
file_name=$(basename "$file")
hash_value=$(sha256sum "$file" | cut -d' ' -f1)
hashes="${hashes}${file_name}:<br /> \`\`\`${hash_value}\`\`\` <br />"
done
echo "::set-output name=hashes::${hashes}"
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.TAG }}
name: "Release ${{ env.TAG }}"
body: |
## File Hashes:
${{ steps.hashes.outputs.hashes }}
files: |
x64/Release/*
token: ${{ secrets.GITHUB_TOKEN }}
append_body: true