-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from vinsworldcom/actions
Add GitHub Actions
- Loading branch information
Showing
4 changed files
with
110 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
|
||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: CI_build | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: windows-latest | ||
strategy: | ||
max-parallel: 6 | ||
matrix: | ||
build_configuration: [Release, Debug] | ||
build_platform: [x64, Win32, ARM64] | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Add msbuild to PATH | ||
uses: microsoft/setup-msbuild@v1 | ||
|
||
- name: MSBuild of plugin dll | ||
working-directory: .\vs.proj | ||
run: msbuild NppMultiReplace.vcxproj /m /p:configuration="${{ matrix.build_configuration }}" /p:platform="${{ matrix.build_platform }}" /p:PlatformToolset="v143" /target:zip | ||
env: | ||
ZIPCMD: 7z a -tzip | ||
|
||
- name: Archive | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: NppMultiReplace-${{ matrix.build_configuration }}-${{ matrix.build_platform }} | ||
path: vs.proj\${{ matrix.build_configuration }}\${{ matrix.build_platform }}\NppMultiReplace.dll | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') && matrix.build_configuration == 'Release' | ||
with: | ||
body: ${{ github.event.commits[0].message }} | ||
files: vs.proj/${{ matrix.build_configuration }}/${{ matrix.build_platform }}/NppMultiReplace-v${{ github.ref_name }}-${{ matrix.build_platform }}.zip | ||
|
||
- name: SHA256 | ||
if: startsWith(github.ref, 'refs/tags/') && matrix.build_configuration == 'Release' | ||
run: sha256sum.exe vs.proj\${{ matrix.build_configuration }}\${{ matrix.build_platform }}\NppMultiReplace-v${{ github.ref_name }}-${{ matrix.build_platform }}.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,32 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup /> | ||
|
||
<!-- | ||
Rename PROJECTNAME to the same as the *.vcxproj file in your project. | ||
Or, import into that file by adding before the last closing tag: | ||
<Import Project="PROJECTNAME.vcxproj.user"/> | ||
Then, call with: | ||
msbuild /target:zip | ||
You can customize the ZIP program by setting the environment variable: | ||
set ZIPCMD=zip | ||
set ZIPCMD=7z a -tzip | ||
--> | ||
|
||
<Target Name="Zip" DependsOnTargets="Build"> | ||
<PropertyGroup> | ||
<ZipCmd Condition="'$(ZIPCMD)' == ''">zip</ZipCmd> | ||
</PropertyGroup> | ||
<Exec Command="if not exist $(OutDir)$(TargetName) mkdir $(OutDir)$(TargetName)"/> | ||
<Exec Command="copy $(OutDir)$(TargetName)$(TargetExt) $(OutDir)$(TargetName)"/> | ||
<Exec Command="copy $(OutDir)license.txt $(OutDir)$(TargetName)"/> | ||
<Exec Command="copy $(OutDir)README.md $(OutDir)$(TargetName)"/> | ||
<Exec Command="for /f %%i in ('powershell -NoProfile -Command "(Get-Item $(OutDir)$(TargetName)$(TargetExt)).VersionInfo.ProductVersion"') do del $(OutDir)$(TargetName)-v%%i-$(Platform).zip"/> | ||
<Exec Command="for /f %%i in ('powershell -NoProfile -Command "(Get-Item $(OutDir)$(TargetName)$(TargetExt)).VersionInfo.ProductVersion"') do cd $(OutDir)$(TargetName) %26%26 $(ZIPCMD) -r ..\$(TargetName)-v%%i-$(Platform).zip *"/> | ||
</Target> | ||
</Project> |