diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..39095f6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,13 @@ +## Title + + + +## Description + + + +### Checklist: + +- [ ] It's a bug report. +- [ ] It's a feature request. +- [ ] Related language label is selected. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..3d3f0ea --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,19 @@ +## Description + + + +### Related issue(s) + + + +### Checklist: + +- [ ] It refers to an [Issue](https://github.com/EasyMicroservices/UICores/issues). +- [ ] It fixes a bug. +- [ ] It's a new feature (non-breaking change which adds functionality) +- [ ] It's a breaking (fix or feature that would cause existing functionality to change) +- [ ] My code follows the code style of this project. +- [ ] I have added tests to cover my changes. +- [ ] All new and existing tests passed. +- [ ] CHANGELOG is updated. +- [ ] Related language label is selected. diff --git a/.github/workflows/dotnet-format-action.yml b/.github/workflows/dotnet-format-action.yml new file mode 100644 index 0000000..f9ed8b1 --- /dev/null +++ b/.github/workflows/dotnet-format-action.yml @@ -0,0 +1,36 @@ +name: dotnet format +on: + push: + branches: [develop] + +jobs: + format: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: | + 7.0.x + - name: Run dotnet format + id: format + uses: jfversluis/dotnet-format@v1.0.5 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + action: "fix" + workspace: "./src/CSharp/EasyMicroservices.UI.Core.sln" + - name: Test + run: | + dotnet test ./src/CSharp/EasyMicroservices.UI.Core.sln -f net7.0 + - name: Commit files + if: steps.format.outputs.has-changes == 'true' + uses: EndBug/add-and-commit@v4.1.0 + with: + author_name: Github Actions + author_email: actions@github.com + message: "chore: Automated dotnet-format update" + ref: ${{ github.head_ref }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/dotnet-linux.yml b/.github/workflows/dotnet-linux.yml new file mode 100644 index 0000000..8707287 --- /dev/null +++ b/.github/workflows/dotnet-linux.yml @@ -0,0 +1,25 @@ +name: Linux (dotnet build and test) + +on: + push: + branches: [develop] + pull_request: + branches: [develop] + +jobs: + os-tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: | + 7.0.x + - name: Restore dependencies + run: dotnet restore ./src/CSharp/EasyMicroservices.UI.Core.sln + - name: Build + run: dotnet build ./src/CSharp/EasyMicroservices.UI.Core.sln --no-restore + - name: Test + run: | + dotnet test ./src/CSharp/EasyMicroservices.UI.Core.sln --no-build --verbosity normal -f net7.0 diff --git a/.github/workflows/dotnet-macos.yml b/.github/workflows/dotnet-macos.yml new file mode 100644 index 0000000..ae55363 --- /dev/null +++ b/.github/workflows/dotnet-macos.yml @@ -0,0 +1,25 @@ +name: MacOS (dotnet build and test) + +on: + push: + branches: [develop] + pull_request: + branches: [develop] + +jobs: + os-tests: + runs-on: macos-latest + steps: + - uses: actions/checkout@v3 + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: | + 7.0.x + - name: Restore dependencies + run: dotnet restore ./src/CSharp/EasyMicroservices.UI.Core.sln + - name: Build + run: dotnet build ./src/CSharp/EasyMicroservices.UI.Core.sln --no-restore + - name: Test + run: | + dotnet test ./src/CSharp/EasyMicroservices.UI.Core.sln --no-build --verbosity normal -f net7.0 diff --git a/.github/workflows/dotnet-windows.yml b/.github/workflows/dotnet-windows.yml new file mode 100644 index 0000000..9e0ae2c --- /dev/null +++ b/.github/workflows/dotnet-windows.yml @@ -0,0 +1,24 @@ +name: Windows (dotnet build and test) + +on: + push: + branches: [develop] + pull_request: + branches: [develop] + +jobs: + os-tests: + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: | + 7.0.x + - name: Restore dependencies + run: dotnet restore ./src/CSharp/EasyMicroservices.UI.Core.sln + - name: Build + run: dotnet build ./src/CSharp/EasyMicroservices.UI.Core.sln --no-restore + - name: Test + run: dotnet test ./src/CSharp/EasyMicroservices.UI.Core.sln --no-build --verbosity normal diff --git a/.github/workflows/nuget-push-public.yml b/.github/workflows/nuget-push-public.yml new file mode 100644 index 0000000..bf18072 --- /dev/null +++ b/.github/workflows/nuget-push-public.yml @@ -0,0 +1,25 @@ +name: NuGet Push Public + +on: [workflow_dispatch] + +jobs: + build-test-prep-push: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-dotnet@v3 + with: + dotnet-version: | + 7.0.x + env: + DOTNET_INSTALL_DIR: /usr/share/dotnet + - name: Restore dependencies + run: dotnet restore ./src/CSharp/EasyMicroservices.UI.Core.sln + - name: Build + run: dotnet build ./src/CSharp/EasyMicroservices.UI.Core.sln --no-restore + - name: Test + run: dotnet test ./src/CSharp/EasyMicroservices.UI.Core.sln --no-build --verbosity normal + - name: Create the package + run: dotnet pack ./src/CSharp/EasyMicroservices.UI.Core.sln --output nupkgs + - name: Publish the package to NuGet.org + run: dotnet nuget push nupkgs\*.nupkg -k ${{secrets.NUGET_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate \ No newline at end of file