Skip to content
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
39 changes: 39 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# エディターの基本設定(Visual Studio・VS Code・Rider など)
# 改行コードは Git の core.autocrlf に任せるため、end_of_line は指定しない
root = true

[*]
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

# .cs は UTF-8(BOM 付き)
[*.cs]
charset = utf-8-bom

[*.{csproj,props,targets,xml,yml,yaml,json,mjs,js}]
indent_size = 2

[*.sln]
indent_style = tab

# Markdown は行末の空白2つが改行の意味になるため、削除しない
[*.md]
trim_trailing_whitespace = false

# gh actions-lock が生成するロックファイル(YAML)は、手で整形しない
[.github/workflows/actions.lock]
charset = unset
indent_style = unset
indent_size = unset
insert_final_newline = unset
trim_trailing_whitespace = unset

# テストデータは 1.x の出力や実データの形式に合わせているので、エディターで変更しない
[**/TestData/**]
charset = unset
indent_style = unset
indent_size = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
23 changes: 23 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,26 @@ jobs:
- name: nuget.org に公開
# .snupkg(シンボルパッケージ)は同じフォルダーにあれば一緒に公開される
run: dotnet nuget push "artifacts/*.nupkg" --api-key ${{ steps.login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate

# nuget.org に公開したあと、タグの GitHub Release を作る(リリースノートはマージした PR から自動生成)
# 書き込み権限は、Trusted Publishing を扱う publish ジョブとは分けてこのジョブだけに付ける
github-release:
needs: publish
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: GitHub Release の作成
env:
GH_TOKEN: ${{ github.token }}
shell: bash
run: |
# v2.1.0-beta.1 のような - を含むタグはプレリリースにする
prerelease=()
if [[ "$GITHUB_REF_NAME" == *-* ]]; then prerelease=(--prerelease); fi
# 手で先に作った場合や、ジョブを再実行した場合は、作成済みの Release をそのまま使う
if gh release view "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" > /dev/null 2>&1; then
echo "Release $GITHUB_REF_NAME は作成済みのため、スキップする"
exit 0
fi
gh release create "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" --verify-tag --generate-notes --title "$GITHUB_REF_NAME" "${prerelease[@]}"
Loading
Loading