This repository has been archived by the owner on Jul 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/MiroKaku/ucxxrt
- Loading branch information
Showing
8 changed files
with
163 additions
and
99 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,96 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: build & publish | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the master branch | ||
on: [push, pull_request] | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: windows-2019 | ||
|
||
# Any commit that contains [build] will now trigger these jobs, everything else will be skipped. | ||
# if: "contains(github.event.head_commit.message, '[build]')" | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v3 | ||
|
||
- name: build nuspec | ||
if: contains(github.ref, 'tags/') | ||
working-directory: ${{github.workspace}} | ||
shell: pwsh | ||
run: | | ||
if($env:GITHUB_REF.StartsWith("refs/tags/v", "CurrentCultureIgnoreCase")) | ||
{ | ||
$BuildVersion = $env:GITHUB_REF.Remove(0, 11); | ||
echo "BuildVersion=$BuildVersion" >> $env:GITHUB_ENV | ||
# github的内置版本有Bug,此行必须添加,否则无法获得内容 | ||
git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
$releaseNotes = & git tag -l --format='%(contents)' $env:GITHUB_REF.Remove(0, 10) | ||
$content = [System.IO.File]::ReadAllText("nuget\ucxxrt.nuspec") | ||
$releaseNotesToken = '$releaseNotes$' | ||
$releaseNotesIndex = $content.IndexOf($releaseNotesToken) | ||
if($releaseNotesIndex -ne -1) | ||
{ | ||
echo $content.Substring(0, $releaseNotesIndex) | out-file "nuget\ucxxrt-new.nuspec" -NoNewline | ||
echo $releaseNotes | out-file "nuget\ucxxrt-new.nuspec" -Append | ||
echo $content.Remove(0, $releaseNotesIndex + $releaseNotesToken.Length) | out-file "nuget\ucxxrt-new.nuspec" -NoNewline -Append | ||
} | ||
} | ||
- name: compile | ||
working-directory: ${{github.workspace}} | ||
shell: cmd | ||
run: call .\.github\workflows\build.bat | ||
|
||
- name: upload an artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ucxxrt | ||
path: ucxxrt\ | ||
if-no-files-found: error | ||
|
||
- name: pack zip | ||
if: contains(github.ref, 'tags/') | ||
working-directory: ${{github.workspace}} | ||
shell: cmd | ||
run: 7z a -tzip ucxxrt.zip ucxxrt\ | ||
|
||
- name: pack nuget | ||
if: contains(github.ref, 'tags/') | ||
working-directory: ${{github.workspace}} | ||
shell: cmd | ||
run: | | ||
if "${{env.BuildVersion}}" NEQ "" ( | ||
nuget pack nuget\ucxxrt-new.nuspec -Properties version=${{env.BuildVersion}};commit=%GITHUB_SHA% | ||
) | ||
if %ERRORLEVEL% NEQ 0 exit /B %ERRORLEVEL% | ||
- name: publish a version | ||
if: contains(github.ref, 'tags/') | ||
uses: "marvinpinto/[email protected]" | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
prerelease: false | ||
files: | | ||
ucxxrt.zip | ||
*.nupkg | ||
- name: publish nuget | ||
if: contains(github.ref, 'tags/') | ||
working-directory: ${{github.workspace}} | ||
shell: cmd | ||
run: | | ||
nuget push ucxxrt.${{env.BuildVersion}}.nupkg -ApiKey ${{ secrets.NUGET_TOKEN }} -Source https://api.nuget.org/v3/index.json | ||
if %ERRORLEVEL% NEQ 0 exit /B %ERRORLEVEL% |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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,28 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd"> | ||
<metadata minClientVersion="2.5"> | ||
<id>ucxxrt</id> | ||
<version>$version$</version> | ||
<title>Universal C++ RunTime (UCXXRT)</title> | ||
<authors>MiroKaku (MeeSong)</authors> | ||
<owners>MiroKaku (MeeSong)</owners> | ||
<developmentDependency>true</developmentDependency> | ||
<requireLicenseAcceptance>true</requireLicenseAcceptance> | ||
<license type="file">lib\native\LICENSE</license> | ||
<readme>lib\native\README.md</readme> | ||
<projectUrl>https://github.com/MiroKaku/ucxxrt</projectUrl> | ||
<description>The Universal C++ RunTime library, supporting kernel-mode C++ exception-handler and STL.</description> | ||
<releaseNotes>$releaseNotes$</releaseNotes> | ||
<copyright>Copyright© MiroKaku</copyright> | ||
<language>en-US</language> | ||
<tags>ucxxrt wdk driver kernel</tags> | ||
<repository type="git" url="https://github.com/MiroKaku/ucxxrt.git" branch="master" commit="$commit$" /> | ||
<dependencies> | ||
<dependency id="YY.NuGet.Import.Helper" version="1.0.0.4" /> | ||
</dependencies> | ||
</metadata> | ||
<files> | ||
<file src="ucxxrt.props" target="build\ucxxrt.props" /> | ||
<file src="..\ucxxrt\**" target="lib\native" exclude="**\*.lastcodeanalysissucceeded;"/> | ||
</files> | ||
</package> |
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,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<NuGetImportAfterCppProps Condition="Exists('$(MSBuildThisFileDirectory)..\lib\native\ucxxrt.props')">$(NuGetImportAfterCppProps);$(MSBuildThisFileDirectory)..\lib\native\ucxxrt.props</NuGetImportAfterCppProps> | ||
</PropertyGroup> | ||
</Project> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.