-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (66 loc) · 2.17 KB
/
release.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
78
name: Release
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
permissions:
contents: write
env:
ASSEMBLY_NAME: wcu_${{ github.ref_name }}_amd64
jobs:
release:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
working-directory: Keeper.WindowsCredentialManager
run: dotnet restore
- name: Build
working-directory: Keeper.WindowsCredentialManager
run: |
dotnet build `
--no-restore `
--configuration Release `
/p:AssemblyName=${{ env.ASSEMBLY_NAME }}
- name: Publish
working-directory: Keeper.WindowsCredentialManager
run: |
dotnet publish `
--no-build `
--configuration Release `
--output ..\publish `
/p:AssemblyName=${{ env.ASSEMBLY_NAME }}
- uses: dlemstra/code-sign-action@v1
with:
certificate: '${{ secrets.CERTIFICATE }}'
password: '${{ secrets.CERTIFICATE_PASSWORD }}'
folder: publish
recursive: true
files: |
${{ env.ASSEMBLY_NAME }}.exe
description: "Keeper's Windows Credential Manager Utility"
- name: Create checksum
run: |
$FileHash = (Get-FileHash publish\${{ env.ASSEMBLY_NAME }}.exe -Algorithm SHA256).Hash
New-Item -Path publish\checksums.txt -Value "$FileHash ${{ env.ASSEMBLY_NAME }}.exe" -Force
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "${{ github.ref_name }}" `
--title "${{ github.ref_name }}" `
--repo "${{ github.repository }}" `
--generate-notes
- name: Upload artifacts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload "${{ github.ref_name }}" `
--repo "${{ github.repository }}" `
(Get-Item publish\${{ env.ASSEMBLY_NAME }}.exe).FullName `
(Get-Item publish\checksums.txt).FullName