Skip to content

Commit

Permalink
Bump with dotnet file sync, clean artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
kzu committed Nov 17, 2022
1 parent 8deb12f commit 6ebac64
Show file tree
Hide file tree
Showing 30 changed files with 562 additions and 472 deletions.
12 changes: 8 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
# top-most EditorConfig file
root = true

# ignore submodule
[gcm/**]
generated_code = true

# Don't use tabs for indentation.
[*]
indent_style = space
Expand Down Expand Up @@ -91,3 +87,11 @@ csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true

# Test settings
[**/*Tests*/*{.cs,.vb}]
# xUnit1013: Public method should be marked as test. Allows using records as test classes
dotnet_diagnostic.xUnit1013.severity = none

# VSTHRD200: Use "Async" suffix for async methods
dotnet_diagnostic.VSTHRD200.severity = none
1 change: 0 additions & 1 deletion .github/FUNDING.yml

This file was deleted.

50 changes: 0 additions & 50 deletions .github/ISSUE_TEMPLATE/bug.md

This file was deleted.

2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ updates:
- package-ecosystem: nuget
directory: /
schedule:
interval: weekly
interval: daily
25 changes: 25 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
changelog:
exclude:
labels:
- bydesign
- dependencies
- duplicate
- question
- invalid
- wontfix
- need info
- docs
authors:
- devlooped-bot
- dependabot
- github-actions
categories:
- title: ✨ Implemented enhancements
labels:
- enhancement
- title: 🐛 Fixed bugs
labels:
- bug
- title: 🔨 Other
labels:
- '*'
47 changes: 34 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ name: build
on:
workflow_dispatch:
push:
branches: [ main, dev, 'feature/*', 'rel/*' ]
branches: [ main, dev, 'dev/*', 'feature/*', 'rel/*' ]
paths-ignore:
- changelog.md
- code-of-conduct.md
- security.md
- support.md
- readme.md
pull_request:
types: [opened, synchronize, reopened]

Expand All @@ -22,28 +23,29 @@ defaults:
shell: bash

jobs:
dotnet-format:
os-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.lookup.outputs.matrix }}
steps:
- name: 🤘 checkout
uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0

- name: ✓ ensure format

- name: 🔎 lookup
id: lookup
shell: pwsh
run: |
dotnet tool update -g dotnet-format --version 5.0.*
dotnet restore
dotnet format --check -v:diag
$path = './.github/workflows/os-matrix.json'
$os = if (test-path $path) { cat $path } else { '["ubuntu-latest"]' }
echo "matrix=$os" >> $env:GITHUB_OUTPUT
build:
needs: os-matrix
name: build-${{ matrix.os }}
needs: dotnet-format
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
os: ${{ fromJSON(needs.os-matrix.outputs.matrix) }}
steps:
- name: 🤘 checkout
uses: actions/checkout@v2
Expand All @@ -54,8 +56,14 @@ jobs:
- name: 🙏 build
run: dotnet build -m:1 -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER"

- name: ⚙ GNU grep
if: matrix.os == 'macOS-latest'
run: |
brew install grep
echo 'export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"' >> .bash_profile
- name: 🧪 test
run: dotnet test --no-build -m:1 --blame-hang --blame-hang-timeout 5m
uses: ./.github/workflows/test

- name: 📦 pack
run: dotnet pack -m:1 -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER"
Expand All @@ -68,3 +76,16 @@ jobs:
run: |
dotnet tool install -g --version 4.0.18 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" || echo "No packages found"
dotnet-format:
runs-on: ubuntu-latest
needs: build
steps:
- name: 🤘 checkout
uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0

- name: ✓ ensure format
run: dotnet format --verify-no-changes -v:diag --exclude ~/.nuget
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
usernames-as-github-logins=true
header-label=
issues_wo_labels=true
pr_wo_labels=true
exclude-labels=dependencies,duplicate,question,invalid,wontfix,need info
exclude-labels=bydesign,dependencies,duplicate,question,invalid,wontfix,need info,docs
enhancement-label=:sparkles: Implemented enhancements:
bugs-label=:bug: Fixed bugs:
issues-label=:hammer: Other:
Expand Down
34 changes: 18 additions & 16 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,39 @@
name: changelog
on:
workflow_dispatch:
release:
types: [released]
workflow_dispatch:

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: 🤖 defaults
uses: devlooped/actions-bot@v1
with:
name: ${{ secrets.BOT_NAME }}
email: ${{ secrets.BOT_EMAIL }}
gh_token: ${{ secrets.GH_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: 🤘 checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: main
token: ${{ env.GH_TOKEN }}

- name: ⚙ ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.3

- name: ⚙ changelog
uses: faberNovel/github-changelog-generator-action@master
with:
options: --token ${{ secrets.GITHUB_TOKEN }} --o changelog.md
run: |
gem install github_changelog_generator
github_changelog_generator --user ${GITHUB_REPOSITORY%/*} --project ${GITHUB_REPOSITORY##*/} --token $GH_TOKEN --o changelog.md --config-file .github/workflows/changelog.config
- 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) || echo "Done"
(git commit -m "🖉 Update changelog with ${GITHUB_REF#refs/*/}" && git push) || echo "Done"
Loading

0 comments on commit 6ebac64

Please sign in to comment.