Skip to content

Commit

Permalink
Merge pull request #1 from Toine-db/setup
Browse files Browse the repository at this point in the history
Setup solution
  • Loading branch information
Toine-db authored Oct 25, 2024
2 parents b198ec1 + 1f0fafc commit 9109b18
Show file tree
Hide file tree
Showing 34 changed files with 2,423 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
21 changes: 21 additions & 0 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Run Tests for CI

on:
push:
branches: [ "main" ]
paths-ignore:
- "**.md"
pull_request:
branches: [ "main" ]

jobs:
build-sample-ci:

runs-on: windows-latest

steps:
- uses: actions/checkout@v4
- name: Build
run: dotnet build test\MarkdownParser.Test.sln -c Release
- name: Run Tests
run: dotnet test test\MarkdownParser.Test\MarkdownParser.Test.csproj
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Build for CI

on:
push:
branches: [ "main" ]
paths-ignore:
- "**.md"
pull_request:
branches: [ "main" ]

jobs:
build-plugin-ci:

runs-on: windows-latest

steps:
- uses: actions/checkout@v4
- name: Build
run: dotnet build src\MarkdownParser.sln -c Release
29 changes: 29 additions & 0 deletions .github/workflows/release-nuget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Create a (Pre)release on NuGet

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-preview[0-9]+"
jobs:
release-nuget:

runs-on: windows-latest

steps:
- uses: actions/checkout@v4
- name: Verify commit exists in origin/main
run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
git branch --remote --contains | grep origin/main
- name: Get version information from tag
id: get_version
run: |
$version="${{github.ref_name}}".TrimStart("v")
"version-without-v=$version" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
- name: Pack
run: dotnet pack src\MarkdownParser.sln -c Release -p:PackageVersion=${{ steps.get_version.outputs.version-without-v }}
- name: Push
run: dotnet nuget push src\MarkdownParser\bin\Release\MarkdownParser.${{ steps.get_version.outputs.version-without-v }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
env:
GITHUB_TOKEN: ${{ secrets.NUGET_API_KEY }}
Loading

0 comments on commit 9109b18

Please sign in to comment.