-
Notifications
You must be signed in to change notification settings - Fork 0
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 #9 from mod-posh/v1.1.0
V1.1.0
- Loading branch information
Showing
5 changed files
with
166 additions
and
47 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,72 @@ | ||
# For most projects, this workflow file will not need changing; you simply need | ||
# to commit it to your repository. | ||
# | ||
# You may wish to alter this file to override the set of languages analyzed, | ||
# or to provide custom queries or build logic. | ||
# | ||
# ******** NOTE ******** | ||
# We have attempted to detect the languages in your repository. Please check | ||
# the `language` matrix defined below to confirm you have the correct set of | ||
# supported CodeQL languages. | ||
# | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ "main" ] | ||
schedule: | ||
- cron: '19 8 * * 4' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'csharp' ] | ||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] | ||
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v3 | ||
with: | ||
languages: ${{ matrix.language }} | ||
# If you wish to specify custom queries, you can do so here or in a config file. | ||
# By default, queries listed here will override any specified in a config file. | ||
# Prefix the list here with "+" to use these queries and those in the config file. | ||
|
||
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs | ||
# queries: security-extended,security-and-quality | ||
|
||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v3 | ||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun | ||
|
||
# If the Autobuild fails above, remove it and uncomment the following three lines. | ||
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. | ||
|
||
# - run: | | ||
# echo "Run, Build Application using script" | ||
# ./location_of_script_within_repo/buildscript.sh | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v3 |
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,70 +1,67 @@ | ||
name: .NET 7 Build, Test, and Release Process | ||
name: Build Logger Project | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build_and_test: | ||
runs-on: windows-latest | ||
outputs: | ||
should-run: ${{ steps.set-output.outputs.should-run }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v1 | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: '7.0.x' | ||
|
||
- name: Restore dependencies | ||
run: dotnet restore ${{ github.workspace }}/<YourProjectName>/<YourProjectName>.sln | ||
run: dotnet restore ${{ github.workspace }}/Logger/Logger.sln | ||
|
||
- name: Clean | ||
run: dotnet clean ${{ github.workspace }}/<YourProjectName>/<YourProjectName>.sln --configuration Release | ||
run: dotnet clean ${{ github.workspace }}/Logger/Logger.sln --configuration Release | ||
|
||
- name: Build | ||
run: dotnet build ${{ github.workspace }}/<YourProjectName>/<YourProjectName>.sln --configuration Release --no-restore | ||
run: dotnet build ${{ github.workspace }}/Logger/Logger.sln --configuration Release --no-restore | ||
|
||
- name: Test | ||
run: dotnet test ${{ github.workspace }}/<YourProjectName>/<YourProjectName>.sln --configuration Release --no-build | ||
run: dotnet test ${{ github.workspace }}/Logger/Logger.sln --configuration Release --no-build --logger "trx;LogFileName=test_results.trx" | ||
|
||
- name: Set Output | ||
run: echo "::set-output name=should-run::true" | ||
id: set-output | ||
|
||
project_operations: | ||
needs: build_and_test | ||
if: needs.build_and_test.outputs.should-run == 'true' | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Generate Release Notes from Milestone | ||
uses: jeffpatton1971/[email protected] | ||
- name: Publish Test Results | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
milestone: '<YourMilestone>' | ||
name: Test Results | ||
path: '**/TestResults/*.trx' | ||
|
||
pack_and_publish: | ||
needs: [build_and_test, project_operations] | ||
if: needs.build_and_test.outputs.should-run == 'true' | ||
needs: build_and_test | ||
if: success() | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v1 | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: '7.0.x' | ||
|
||
- name: Restore dependencies | ||
run: dotnet restore ${{ github.workspace }}/Logger/Logger.sln | ||
|
||
- name: Build | ||
run: dotnet build ${{ github.workspace }}/Logger/Logger.sln --configuration Release --no-restore | ||
|
||
- name: Package | ||
run: dotnet pack ${{ github.workspace }}/<YourProjectName>/<YourProjectName>.sln --configuration Release --no-build --output nupkgs | ||
run: dotnet pack ${{ github.workspace }}/Logger/Logger.sln --configuration Release --output nupkgs | ||
|
||
- name: Publish NuGet Package | ||
run: | | ||
nuget push **/*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json | ||
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | ||
nuget push **/*.nupkg -ApiKey ${{secrets.NUGET_API_KEY}} -Source https://api.nuget.org/v3/index.json | ||
if: github.ref == 'refs/heads/main' && github.event_name == 'push' |
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,19 +1,69 @@ | ||
name: Generate Release Notes on Milestone Closure | ||
name: New Release | ||
|
||
on: | ||
milestone: | ||
types: [closed] | ||
|
||
jobs: | ||
generate_release_notes: | ||
create-release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Generate Release Notes | ||
uses: jeffpatton1971/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
milestone: ${{ github.event.milestone.number }} | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get Project Version | ||
id: get_version | ||
uses: mod-posh/[email protected] | ||
with: | ||
Filename: 'Logger/Logger.csproj' | ||
verbose: "verbose" | ||
|
||
- name: Create Release Notes | ||
uses: mod-posh/[email protected] | ||
with: | ||
milestone_number: ${{ github.event.milestone.number }} | ||
verbose: 'verbose' | ||
github_token: ${{ secrets.PAT }} | ||
|
||
- name: Pull Latest Changes | ||
run: git pull origin ${{ github.ref_name }} | ||
shell: bash | ||
|
||
- name: Create Release | ||
uses: mod-posh/[email protected] | ||
with: | ||
name: 'Release v${{ env.VERSION }}' | ||
filename: 'RELEASE.md' | ||
version: ${{ env.VERSION }} | ||
verbose: 'verbose' | ||
github_token: ${{ secrets.PAT }} | ||
|
||
- name: Install XMLDocMD Tool | ||
run: dotnet tool install --global xmldocmd | ||
|
||
- name: Build Project | ||
run: dotnet build Logger/Logger.csproj --configuration Release | ||
|
||
- name: Publish Project | ||
run: dotnet publish Logger/Logger.csproj --configuration Release --output ./publish | ||
|
||
- name: Generate Documentation | ||
run: | | ||
xmldocmd ./publish/Logger.dll Docs --visibility private --clean --namespace ModPosh.Logger --namespace-pages | ||
env: | ||
PATH: ${{ github.runner.tool_cache }}/.dotnet/tools:$PATH:~/.dotnet/tools | ||
|
||
- name: Run markdownlint-cli2-action | ||
uses: DavidAnson/markdownlint-cli2-action@v16 | ||
with: | ||
globs: '**/*.md' | ||
fix: true | ||
|
||
- name: Commit Documentation Changes | ||
run: | | ||
git config --local user.name "github-actions[bot]" | ||
git config --local user.email "github-actions[bot]@users.noreply.github.com" | ||
git add Docs/ | ||
git commit -m "Update documentation for release v${{ env.VERSION }}" | ||
git push origin ${{ github.ref_name }} | ||
if: success() |
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