Skip to content

release

release #2

Workflow file for this run

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@v4
- 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@v2
- 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@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- 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@v4
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@v4
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@v4
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@v6
with:
file_pattern: 'doc/*.md'