-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (61 loc) · 2.12 KB
/
Copy pathrelease.yml
File metadata and controls
72 lines (61 loc) · 2.12 KB
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
name: Build Windows Release
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions:
contents: write
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
jobs:
test-and-release:
name: Test, build, and release
runs-on: windows-latest
timeout-minutes: 30
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install pinned .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: "9.0.312"
- name: Run security regression tests
shell: pwsh
run: >-
dotnet run
--project tests\CodeSummarizer.Windows.Tests.csproj
--configuration Release
- name: Build general-purpose package
shell: pwsh
run: .\publish.ps1 -GeneralPurpose -SkipInstaller
- name: Build restricted assessment package
shell: pwsh
run: .\publish.ps1 -SkipInstaller
- name: Upload workflow artifacts
uses: actions/upload-artifact@v4
with:
name: CodeSummarizer-Windows-${{ github.ref_name }}
path: |
artifacts/CodeSummarizer-Windows-win-x64-general.zip
artifacts/CodeSummarizer-Windows-win-x64-general.zip.sha256
artifacts/CodeSummarizer-Windows-win-x64-restricted.zip
artifacts/CodeSummarizer-Windows-win-x64-restricted.zip.sha256
if-no-files-found: error
retention-days: 7
- name: Publish GitHub Release
if: startsWith(github.ref, 'refs/tags/v')
shell: pwsh
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create "${{ github.ref_name }}" `
"artifacts/CodeSummarizer-Windows-win-x64-general.zip" `
"artifacts/CodeSummarizer-Windows-win-x64-general.zip.sha256" `
"artifacts/CodeSummarizer-Windows-win-x64-restricted.zip" `
"artifacts/CodeSummarizer-Windows-win-x64-restricted.zip.sha256" `
--repo "${{ github.repository }}" `
--verify-tag `
--title "Code Summarizer for Windows ${{ github.ref_name }}" `
--generate-notes