-
Notifications
You must be signed in to change notification settings - Fork 442
110 lines (85 loc) · 3.48 KB
/
release.yml
File metadata and controls
110 lines (85 loc) · 3.48 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: release
on: [workflow_dispatch]
jobs:
build:
runs-on: windows-latest
permissions:
id-token: write
contents: read
strategy:
fail-fast: false
matrix:
build_configuration: [Release]
build_platform: [x64, Win32, arm64]
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: Install python modules
working-directory: .
run: pip3 install -r requirements.txt
- name: check used package versions
working-directory: .
run: pip3 freeze
- name: Validate json
working-directory: .
run: python validator.py ${{ matrix.build_platform }}
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v3
- name: MSBuild of plugin dll
working-directory: vcxproj
run: msbuild nppPluginList.vcxproj /m /p:configuration="${{ matrix.build_configuration }}" /p:platform="${{ matrix.build_platform }}" /p:PlatformToolset="v143"
- name: Azure CLI login with federated credential
uses: azure/login@v3
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
allow-no-subscriptions: true
- name: Install sign cli
run: dotnet tool install --global sign --prerelease
- name: Sign executables and libraries
run: sign code trusted-signing `
--trusted-signing-account ${{ secrets.TRUSTED_SIGNING_ACCOUNT_NAME }} `
--trusted-signing-certificate-profile ${{ secrets.TRUSTED_SIGNING_CERTIFICATE_PROFILE }} `
--trusted-signing-endpoint https://weu.codesigning.azure.net `
--azure-credential-type azure-cli `
--verbosity information `
**/*.dll
- name: Archive artifacts for x64
if: matrix.build_platform == 'x64' && matrix.build_configuration == 'Release'
uses: actions/upload-artifact@v7
with:
name: plugin_dll_and_list_x64
path: |
bin64\nppPluginList.dll
doc\plugin_list_x64.md
- name: Archive artifacts for Win32
if: matrix.build_platform == 'Win32' && matrix.build_configuration == 'Release'
uses: actions/upload-artifact@v7
with:
name: plugin_dll_and_list_x86
path: |
bin\nppPluginList.dll
doc\plugin_list_x86.md
- name: Archive artifacts for ARM64
if: matrix.build_platform == 'ARM64' && matrix.build_configuration == 'Release'
uses: actions/upload-artifact@v7
with:
name: plugin_dll_and_list_arm64
path: |
binarm64\nppPluginList.dll
doc\plugin_list_arm64.md
- name: Checkout main branch if push trigger is a tag
if: github.repository_owner == 'notepad-plus-plus' && github.ref_type == 'tag' && matrix.build_platform == 'ARM64' && matrix.build_configuration == 'Release'
run: |
git fetch --all
git checkout master
- name: Generate all plugin lists markdown from json on tagging
if: startsWith(github.ref, 'refs/tags/') && matrix.build_platform == 'ARM64' && matrix.build_configuration == 'Release'
working-directory: .
run: python validator.py all_md
- name: Push markdown changes on tagging
if: startsWith(github.ref, 'refs/tags/') && matrix.build_platform == 'ARM64' && matrix.build_configuration == 'Release'
uses: stefanzweifel/git-auto-commit-action@v7
with:
file_pattern: 'doc/*.md'