-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
housekeeping: Add Basic GitHub Actions Configuration (#11)
- Loading branch information
1 parent
aa0fbc6
commit 73cd39b
Showing
9 changed files
with
138 additions
and
34 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,100 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
types: [opened, synchronize, reopened, closed] | ||
branches: [ main ] | ||
|
||
env: | ||
configuration: Release | ||
productNamespacePrefix: "XamlNameReferenceGenerator" | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
outputs: | ||
nbgv: ${{ steps.nbgv.outputs.SemVer2 }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
submodules: 'recursive' | ||
|
||
- name: Install .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 5.0.100-rc.2.20479.15 | ||
|
||
- name: NBGV | ||
id: nbgv | ||
uses: dotnet/nbgv@master | ||
with: | ||
setAllVars: true | ||
|
||
- name: NuGet Restore | ||
run: dotnet restore | ||
working-directory: src | ||
|
||
- name: Add MSBuild to PATH | ||
uses: microsoft/setup-msbuild@v1 | ||
|
||
- name: Build | ||
run: dotnet build --configuration ${{ env.configuration }} | ||
working-directory: src | ||
|
||
- name: Run Unit Tests and Generate Coverage | ||
uses: glennawatson/coverlet-msbuild@v1 | ||
with: | ||
project-files: 'src/**/*.Tests.csproj' | ||
no-build: true | ||
exclude-filter: '[${{env.productNamespacePrefix}}.*.Tests.*]*' | ||
include-filter: '[${{env.productNamespacePrefix}}*]*' | ||
output-format: cobertura | ||
output: '../../artifacts/' | ||
configuration: ${{ env.configuration }} | ||
working-directory: src | ||
|
||
- name: Create NuGet Artifacts | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: nuget | ||
path: '**/*.nupkg' | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
if: contains(github.event.pull_request.labels.*.name, 'release') && github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Download NuGet Packages | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: nuget | ||
|
||
- name: Changelog | ||
uses: glennawatson/ChangeLog@v1 | ||
id: changelog | ||
|
||
- name: Create Release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | ||
with: | ||
tag_name: ${{ needs.build.outputs.nbgv }} | ||
release_name: ${{ needs.build.outputs.nbgv }} | ||
body: | | ||
${{ steps.changelog.outputs.commitLog }} | ||
- name: NuGet Push | ||
env: | ||
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_API_KEY }} | ||
SOURCE_URL: https://api.nuget.org/v3/index.json | ||
run: | | ||
dotnet nuget push -s ${{ env.SOURCE_URL }} -k ${{ env.NUGET_AUTH_TOKEN }} **/*.nupkg |
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,18 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<Product>XamlNameReferenceGenerator</Product> | ||
<PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
<PackageProjectUrl>https://github.com/worldbeater/XamlNameReferenceGenerator/</PackageProjectUrl> | ||
<Description>Generates typed x:Name references to Avalonia controls declared in XAML.</Description> | ||
<PackageReleaseNotes>https://github.com/worldbeater/XamlNameReferenceGenerator/releases</PackageReleaseNotes> | ||
<RepositoryUrl>https://github.com/worldbeater/XamlNameReferenceGenerator</RepositoryUrl> | ||
<RepositoryType>git</RepositoryType> | ||
<PublishRepositoryUrl>true</PublishRepositoryUrl> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="all" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="$(MSBuildThisFileDirectory)..\LICENSE" Pack="true" PackagePath="LICENSE" /> | ||
</ItemGroup> | ||
</Project> |
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
31 changes: 0 additions & 31 deletions
31
src/XamlNameReferenceGenerator/Infrastructure/PhysicalFileDebugger.cs
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,11 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", | ||
"version": "0.1", | ||
"assemblyVersion": { | ||
"precision": "revision" | ||
}, | ||
"publicReleaseRefSpec": [ | ||
"^refs/heads/main$", | ||
"^refs/heads/v\\d+\\.\\d+$" | ||
] | ||
} |