-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🖆 Apply devlooped/oss template via dotnet-file
Revamped workflows ensure (among many other things) that we never push debug builds to nuget.org. Fixes #17 Fixes #15
- Loading branch information
Showing
40 changed files
with
944 additions
and
168 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
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,63 +1,24 @@ | ||
############################################################################### | ||
# Set default behavior to automatically normalize line endings. | ||
############################################################################### | ||
* text=auto | ||
# sln, csproj files (and friends) are always CRLF, even on linux | ||
*.sln text eol=crlf | ||
*.proj text eol=crlf | ||
*.csproj text eol=crlf | ||
|
||
############################################################################### | ||
# Set default behavior for command prompt diff. | ||
# | ||
# This is need for earlier builds of msysgit that does not have it on by | ||
# default for csharp files. | ||
# Note: This is only used by command line | ||
############################################################################### | ||
#*.cs diff=csharp | ||
# These are windows specific files which we may as well ensure are | ||
# always crlf on checkout | ||
*.bat text eol=crlf | ||
*.cmd text eol=crlf | ||
|
||
############################################################################### | ||
# Set the merge driver for project and solution files | ||
# | ||
# Merging from the command prompt will add diff markers to the files if there | ||
# are conflicts (Merging from VS is not affected by the settings below, in VS | ||
# the diff markers are never inserted). Diff markers may cause the following | ||
# file extensions to fail to load in VS. An alternative would be to treat | ||
# these files as binary and thus will always conflict and require user | ||
# intervention with every merge. To do so, just uncomment the entries below | ||
############################################################################### | ||
#*.sln merge=binary | ||
#*.csproj merge=binary | ||
#*.vbproj merge=binary | ||
#*.vcxproj merge=binary | ||
#*.vcproj merge=binary | ||
#*.dbproj merge=binary | ||
#*.fsproj merge=binary | ||
#*.lsproj merge=binary | ||
#*.wixproj merge=binary | ||
#*.modelproj merge=binary | ||
#*.sqlproj merge=binary | ||
#*.wwaproj merge=binary | ||
# Opt in known filetypes to always normalize line endings on checkin | ||
# and always use native endings on checkout | ||
*.c text | ||
*.config text | ||
*.h text | ||
*.cs text | ||
*.md text | ||
*.tt text | ||
*.txt text | ||
|
||
############################################################################### | ||
# behavior for image files | ||
# | ||
# image files are treated as binary by default. | ||
############################################################################### | ||
#*.jpg binary | ||
#*.png binary | ||
#*.gif binary | ||
|
||
############################################################################### | ||
# diff behavior for common document formats | ||
# | ||
# Convert binary document formats to text before diffing them. This feature | ||
# is only available from the command line. Turn it on by uncommenting the | ||
# entries below. | ||
############################################################################### | ||
#*.doc diff=astextplain | ||
#*.DOC diff=astextplain | ||
#*.docx diff=astextplain | ||
#*.DOCX diff=astextplain | ||
#*.dot diff=astextplain | ||
#*.DOT diff=astextplain | ||
#*.pdf diff=astextplain | ||
#*.PDF diff=astextplain | ||
#*.rtf diff=astextplain | ||
#*.RTF diff=astextplain | ||
# Some must always be checked out as lf so enforce that for those files | ||
# If these are not lf then bash/cygwin on windows will not be able to | ||
# excute the files | ||
*.sh text eol=lf |
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 @@ | ||
github: devlooped |
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,50 @@ | ||
--- | ||
name: Bug Report | ||
about: Create a report to help us fix a problem. | ||
title: '' | ||
labels: 'bug' | ||
assignees: '' | ||
--- | ||
|
||
## Describe the Bug | ||
|
||
<!-- A clear and concise description of what the bug is. --> | ||
|
||
## Steps to Reproduce | ||
|
||
<!-- Tell us how to reproduce the issue. Ideally provide a failing unit test. --> | ||
|
||
```c# | ||
public class ReproTest | ||
{ | ||
[Fact] | ||
public void Repro() | ||
{ | ||
// arrange | ||
// act | ||
// assert | ||
} | ||
} | ||
``` | ||
|
||
## Expected Behavior | ||
|
||
<!-- Describe what you expected to happen. --> | ||
|
||
## Exception with Stack Trace | ||
|
||
<!-- If you see an exception, put the WHOLE THING here. --> | ||
|
||
```text | ||
Put the exception with stack trace here. | ||
``` | ||
|
||
## Version Info | ||
|
||
<!-- Main project version and other relevant dependencies you are using. --> | ||
|
||
## Additional Info | ||
|
||
<!-- Add any other context about the problem here. --> |
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,8 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Questions | ||
url: https://github.com/kzu/oss/discussions?discussions_q=category%3AQ%26A | ||
about: Want to know how to do something? Check out the Discussions > Q&A area! | ||
- name: Ideas | ||
url: https://github.com/kzu/oss/discussions?discussions_q=category%3AIdeas | ||
about: Suggest an idea to make the project better through the Discussions > Ideas area! |
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 |
---|---|---|
@@ -1,28 +1,69 @@ | ||
name: build | ||
# Builds and runs tests in all three supported OSes | ||
# Pushes CI feed if secrets.SLEET_CONNECTION is provided | ||
|
||
name: build | ||
on: | ||
push: | ||
branches: ['*'] | ||
branches: [ main, dev, 'feature/*', 'rel/*' ] | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
env: | ||
DOTNET_NOLOGO: true | ||
MSBUILDDISABLENODEREUSE: 1 | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
build: | ||
dotnet-format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 🤘 checkout | ||
uses: actions/checkout@v2 | ||
- name: ⚙ dotnet 5.0.x | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 5.0.x | ||
- name: ✓ ensure format | ||
run: | | ||
dotnet tool update -g dotnet-format --version 5.0.* --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json | ||
dotnet format --check -v:diag | ||
build: | ||
name: build-${{ matrix.os }} | ||
needs: dotnet-format | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
steps: | ||
- name: 🤘 checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 | ||
|
||
- name: 🙏 build | ||
run: dotnet build -p:versionsuffix="$(git name-rev --name-only --refs=refs/heads/* HEAD).$GITHUB_RUN_NUMBER" | ||
run: dotnet build -m:1 -bl:build.binlog -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER" -p:RepositoryBranch=${GITHUB_REF#refs/*/} | ||
|
||
- name: 🧪 test | ||
run: dotnet test --no-build -m:1 --blame-hang --blame-hang-timeout 5m -d $GITHUB_WORKSPACE/logs/${{ matrix.os }}.txt -r $GITHUB_WORKSPACE/logs | ||
|
||
- name: 📦 pack | ||
run: dotnet pack -m:1 -bl:pack.binlog -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER" -p:RepositoryBranch=${GITHUB_REF#refs/*/} | ||
|
||
- name: 🔼 logs | ||
if: always() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ matrix.os }} | ||
path: | | ||
**/*.binlog | ||
logs/**/*.* | ||
# Only push CI package to sleet feed if building on ubuntu (fastest) | ||
- name: 🚀 sleet | ||
if: ${{ !github.event.pull_request.head.repo.fork }} | ||
env: | ||
SLEET_CONNECTION: ${{ secrets.SLEET_CONNECTION }} | ||
if: matrix.os == 'ubuntu-latest' && env.SLEET_CONNECTION != '' | ||
run: | | ||
dotnet tool install -g --version 3.2.0 sleet | ||
sleet push bin --config none -f --verbose -p "SLEET_FEED_CONTAINER=nuget" -p "SLEET_FEED_CONNECTIONSTRING=${{ secrets.SLEET_CONNECTION }}" -p "SLEET_FEED_TYPE=azure" | ||
sleet push bin --config none -f --verbose -p "SLEET_FEED_CONTAINER=nuget" -p "SLEET_FEED_CONNECTIONSTRING=${{ secrets.SLEET_CONNECTION }}" -p "SLEET_FEED_TYPE=azure" |
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,37 @@ | ||
name: changelog | ||
on: | ||
release: | ||
types: [released] | ||
|
||
env: | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
|
||
jobs: | ||
changelog: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 🔍 GH_TOKEN | ||
if: env.GH_TOKEN == '' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: echo "GH_TOKEN=${GITHUB_TOKEN}" >> $GITHUB_ENV | ||
|
||
- name: 🤘 checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
ref: main | ||
token: ${{ env.GH_TOKEN }} | ||
|
||
- name: ⚙ changelog | ||
uses: faberNovel/github-changelog-generator-action@master | ||
with: | ||
options: --token ${{ secrets.GITHUB_TOKEN }} --o changelog.md | ||
|
||
- name: 🚀 changelog | ||
run: | | ||
git config --local user.name github-actions | ||
git config --local user.email github-actions@github.com | ||
git add changelog.md | ||
git commit -m "🖉 Update changelog with ${GITHUB_REF#refs/*/}" | ||
git 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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: pages | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- pages | ||
|
||
jobs: | ||
gh-pages: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 🤘 checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: ⚙ jekyll | ||
run: | | ||
sudo gem install bundler | ||
bundle install | ||
- name: 🖉 repo | ||
run: echo "REPOSITORY=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV | ||
|
||
- name: 🙏 build | ||
run: bundle exec jekyll build -b ${{ env.REPOSITORY }} | ||
env: | ||
JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: ✓ commit | ||
run: | | ||
cd _site | ||
git init | ||
git add -A | ||
git config --local user.email "hello@clarius.org" | ||
git config --local user.name "GitHub Action" | ||
git commit -m "Publish pages from ${GITHUB_REPOSITORY}@${GITHUB_SHA:0:9}" | ||
- name: 🚀 push | ||
uses: ad-m/github-push-action@v0.6.0 | ||
with: | ||
github_token: ${{ secrets.CLARIUS_ACCESS_TOKEN }} | ||
repository: clarius/${{ env.REPOSITORY }} | ||
branch: gh-pages | ||
force: true | ||
directory: ./_site |
Oops, something went wrong.