Skip to content

Commit

Permalink
add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali-YousefiTelori committed Dec 2, 2023
1 parent 7e98b8f commit 603c06f
Show file tree
Hide file tree
Showing 11 changed files with 266 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Title

<!-- A sentence about the issue. -->

## Description

<!-- Description of the issue. -->

### Checklist:

- [ ] It's a bug report.
- [ ] It's a feature request.
- [ ] Related language label is selected.
19 changes: 19 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Description

<!-- A few sentences describing the pull request. -->

### Related issue(s)

<!-- If this PR relates to any issues, mention them here. -->

### Checklist:

- [ ] It refers to an [Issue](https://github.com/EasyMicroservices/FileManager/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.
36 changes: 36 additions & 0 deletions .github/workflows/dotnet-format-action.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
action: "fix"
workspace: "./src/CSharp/EasyMicroservices.IdentityMicroservice.sln"
- name: Test
run: |
dotnet test ./src/CSharp/EasyMicroservices.IdentityMicroservice.sln -f net7.0
- name: Commit files
if: steps.format.outputs.has-changes == 'true'
uses: EndBug/[email protected]
with:
author_name: Github Actions
author_email: [email protected]
message: "chore: Automated dotnet-format update"
ref: ${{ github.head_ref }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25 changes: 25 additions & 0 deletions .github/workflows/dotnet-linux-client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Linux Client (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.IdentityMicroservice.Client.sln
- name: Build
run: dotnet build ./src/CSharp/EasyMicroservices.IdentityMicroservice.Client.sln --no-restore
- name: Test
run: |
dotnet test ./src/CSharp/EasyMicroservices.IdentityMicroservice.Client.sln --no-build --verbosity normal -f net7.0
25 changes: 25 additions & 0 deletions .github/workflows/dotnet-linux.yml
Original file line number Diff line number Diff line change
@@ -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.IdentityMicroservice.sln
- name: Build
run: dotnet build ./src/CSharp/EasyMicroservices.IdentityMicroservice.sln --no-restore
- name: Test
run: |
dotnet test ./src/CSharp/EasyMicroservices.IdentityMicroservice.sln --no-build --verbosity normal -f net7.0
25 changes: 25 additions & 0 deletions .github/workflows/dotnet-macos-client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: MacOS Client (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.IdentityMicroservice.Client.sln
- name: Build
run: dotnet build ./src/CSharp/EasyMicroservices.IdentityMicroservice.Client.sln --no-restore
- name: Test
run: |
dotnet test ./src/CSharp/EasyMicroservices.IdentityMicroservice.Client.sln --no-build --verbosity normal -f net7.0
25 changes: 25 additions & 0 deletions .github/workflows/dotnet-macos.yml
Original file line number Diff line number Diff line change
@@ -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.IdentityMicroservice.sln
- name: Build
run: dotnet build ./src/CSharp/EasyMicroservices.IdentityMicroservice.sln --no-restore
- name: Test
run: |
dotnet test ./src/CSharp/EasyMicroservices.IdentityMicroservice.sln --no-build --verbosity normal -f net7.0
24 changes: 24 additions & 0 deletions .github/workflows/dotnet-windows-client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Windows Client (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.IdentityMicroservice.Client.sln
- name: Build
run: dotnet build ./src/CSharp/EasyMicroservices.IdentityMicroservice.Client.sln --no-restore
- name: Test
run: dotnet test ./src/CSharp/EasyMicroservices.IdentityMicroservice.Client.sln --no-build --verbosity normal
24 changes: 24 additions & 0 deletions .github/workflows/dotnet-windows.yml
Original file line number Diff line number Diff line change
@@ -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.IdentityMicroservice.sln
- name: Build
run: dotnet build ./src/CSharp/EasyMicroservices.IdentityMicroservice.sln --no-restore
- name: Test
run: dotnet test ./src/CSharp/EasyMicroservices.IdentityMicroservice.sln --no-build --verbosity normal
25 changes: 25 additions & 0 deletions .github/workflows/nuget-push-public-client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: NuGet Push Public Client

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.IdentityMicroservice.Client.sln
- name: Build
run: dotnet build ./src/CSharp/EasyMicroservices.IdentityMicroservice.Client.sln --no-restore
- name: Test
run: dotnet test ./src/CSharp/EasyMicroservices.IdentityMicroservice.Client.sln --no-build --verbosity normal
- name: Create the package
run: dotnet pack ./src/CSharp/EasyMicroservices.IdentityMicroservice.Client.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
25 changes: 25 additions & 0 deletions .github/workflows/nuget-push-public.yml
Original file line number Diff line number Diff line change
@@ -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.IdentityMicroservice.sln
- name: Build
run: dotnet build ./src/CSharp/EasyMicroservices.IdentityMicroservice.sln --no-restore
- name: Test
run: dotnet test ./src/CSharp/EasyMicroservices.IdentityMicroservice.sln --no-build --verbosity normal
- name: Create the package
run: dotnet pack ./src/CSharp/EasyMicroservices.IdentityMicroservice.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

0 comments on commit 603c06f

Please sign in to comment.