-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
136 additions
and
70 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 @@ | ||
name: main | ||
|
||
permissions: | ||
packages: write | ||
contents: write | ||
actions: read | ||
checks: write | ||
|
||
on: | ||
# on pull_request to master | ||
pull_request: | ||
types: [ opened, synchronize ] | ||
branches: [ main, master ] | ||
|
||
# manual | ||
workflow_dispatch: | ||
|
||
env: | ||
output: bin | ||
project: Serilog.Enrichers.Autodesk.Revit | ||
configuration: Release | ||
default_branch: ${{ github.event.repository.default_branch }} | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# Install the .NET Core workload | ||
- name: Install .NET 8.0 | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 8.0.x | ||
|
||
# Build project: https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-build | ||
- name: Build | ||
run: dotnet build -c ${{ env.configuration }} | ||
|
||
# Test project: https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-test | ||
- name: Test | ||
run: dotnet test -c ${{ env.configuration }} --logger trx --results-directory "TestResults" | ||
|
||
# Upload tests results: https://github.com/dorny/test-reporter | ||
- name: Upload tests results | ||
uses: dorny/test-reporter@v1 | ||
if: success() || failure() | ||
with: | ||
name: dotnet tests | ||
path: ./TestResults/*.trx | ||
reporter: dotnet-trx | ||
|
||
- name: Pack | ||
run: dotnet pack -c ${{ env.configuration }} -o ${{ env.output }} | ||
|
||
# Fetch version: https://github.com/kzrnm/get-net-sdk-project-versions-action | ||
- name: Fetch version | ||
uses: kzrnm/get-net-sdk-project-versions-action@v2 | ||
id: get-version | ||
with: | ||
proj-path: src/${{ env.project }}/${{ env.project }}.csproj | ||
|
||
# Upload the nuget package: https://github.com/marketplace/actions/upload-a-build-artifact | ||
- name: Upload | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: nuget | ||
path: | | ||
${{ env.output }}/*.nupkg | ||
${{ env.output }}/*.snupkg | ||
# Publish the nuget package: https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-push | ||
- name: Publish nuget | ||
if: github.ref_name == env.default_branch | ||
run: dotnet nuget push ${{ env.output }}/**/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate | ||
|
||
# Publish the nuget package: https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-push | ||
- name: Publish github | ||
if: github.ref_name == env.default_branch | ||
run: dotnet nuget push ${{ env.output }}/**/*.nupkg -s https://nuget.pkg.github.com/${{ github.REPOSITORY_OWNER }}/index.json -k ${{ github.TOKEN }} --skip-duplicate | ||
|
||
# Publish release: https://github.com/softprops/action-gh-release | ||
- name: Publish Release | ||
if: github.ref_name == env.default_branch | ||
uses: softprops/action-gh-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.TOKEN }} | ||
with: | ||
tag_name: v${{ steps.get-version.outputs.package-version }} | ||
name: v${{ steps.get-version.outputs.package-version }} | ||
body: v${{ steps.get-version.outputs.package-version }} | ||
draft: true | ||
prerelease: false | ||
files: | | ||
${{ env.output }}/*.nupkg | ||
${{ env.output }}/*.snupkg |
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,13 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [v2.0.0] - 2024-05-14 | ||
### Add | ||
|
||
- net8.0 target framework | ||
- ci workflow | ||
- CHANGELOG.md |
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
15 changes: 8 additions & 7 deletions
15
src/Serilog.Enrichers.Autodesk.Revit.sln → Serilog.Enrichers.Autodesk.Revit.sln
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
11 changes: 0 additions & 11 deletions
11
src/.idea/.idea.Serilog.Enrichers.Autodeks.Revit/.idea/.gitignore
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
src/.idea/.idea.Serilog.Enrichers.Autodeks.Revit/.idea/encodings.xml
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
src/.idea/.idea.Serilog.Enrichers.Autodeks.Revit/.idea/indexLayout.xml
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/.gitignore
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/encodings.xml
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/indexLayout.xml
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/vcs.xml
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