Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Init stuff #1

Merged
merged 13 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": 1,
"isRoot": true,
"tools": {
"fantomas": {
"version": "6.3.4",
"commands": [
"fantomas"
],
"rollForward": false
}
}
}
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
root = true

[*]
indent_size = 2
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true

[*.fs]
indent_style = space

[*.cs]
indent_size = 4
# I'll die on this hill
csharp_new_line_before_open_brace = namespace, types
dotnet_sort_system_directives_first = true
117 changes: 117 additions & 0 deletions .github/workflows/cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: CLI

on:
pull_request:
branches: [ 'main' ]
paths:
- .github/workflows/cli.yml
- src/Cli/**
- src/Cli.Tests/**
push:
branches: [ 'main' ]
tags: [ 'v*.*.*' ]
paths:
- .github/workflows/cli.yml
- src/Cli/**
- src/Cli.Tests/**

defaults:
run:
working-directory: src/Cli

env:
CI: true
ContinuousIntegrationBuild: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
filter: tree:0

- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json

- name: Restore tools
if: github.event_name == 'pull_request'
run: dotnet tool restore

- name: Restore dependencies
run: dotnet restore

- name: Build project
run: dotnet build -c Release --no-restore

- name: Run tests
run: dotnet test -c Release --collect:"XPlat Code Coverage" --no-build

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Lint solution
if: github.event_name == 'pull_request'
run: dotnet format --verify-no-changes

- name: Package library
if: github.event_name == 'push'
run: dotnet pack -c Release -o out --no-build

- name: Upload artifact
id: upload
if: github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: nuget
path: out/*.nupkg
if-no-files-found: error

outputs:
artifact-id: ${{ steps.upload.outputs.artifact-id }}

publish:
runs-on: ubuntu-latest
if: github.event_name == 'push'
needs: [ 'build' ]
strategy:
matrix:
source: [ 'nuget', 'github' ]
env:
PACKAGE_PATTERN: UnMango.Tdl.*.nupkg
permissions:
packages: write
steps:
- uses: actions/download-artifact@v4
with:
name: nuget

- name: Publish to NuGet.org
if: matrix.source == 'nuget'
run: |
dotnet nuget push "$PACKAGE_PATTERN" \
--source https://api.nuget.org/v3/index.json \
--api-key ${{ secrets.NUGET_API_KEY }} \
--skip-duplicate

- name: Authenticate to GitHub Packages
if: matrix.source == 'github'
run: |
dotnet nuget add source \
--username ${{ github.repository_owner }} \
--password ${{ secrets.GITHUB_TOKEN }} \
--store-password-in-clear-text \
--name github \
"https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"

- name: Publish to GitHub Packages
if: matrix.source == 'github'
run: |
dotnet nuget push "$PACKAGE_PATTERN" \
--source ${{ matrix.source }} \
--skip-duplicate
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
bin/
obj/

.yarn/*
!.yarn/cache
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

.make/

discord.xml
13 changes: 13 additions & 0 deletions .idea/.idea.Tdl/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/.idea.Tdl/.idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/.idea.Tdl/.idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/.idea.Tdl/.idea/indexLayout.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/.idea.Tdl/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Now using node v20.11.1 (npm v10.2.4)
v20.11.1
Loading
Loading