diff --git a/.editorconfig b/.editorconfig index 4a24406c5..4b57383ea 100644 --- a/.editorconfig +++ b/.editorconfig @@ -135,3 +135,7 @@ csharp_preserve_single_line_blocks = true [*.vb] # Modifier preferences visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:suggestion + +[*.yml] +indent_style = space +indent_size = 2 \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 46f27eb69..912897c3e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,8 +30,8 @@ jobs: name: Manual Activation File path: ${{ steps.getManualLicenseFile.outputs.filePath }} - testRunnerInAllModes: - name: Unity test + CI: + name: Test runs-on: ubuntu-latest env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} @@ -43,7 +43,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - + - name: Add Coverage Plugin uses: canastro/copy-action@0.0.2 with: @@ -100,3 +100,50 @@ jobs: FrameworkPathOverride: /opt/Unity/Editor/Data/MonoBleedingEdge/ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + Release: + runs-on: windows-latest + needs: CI + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Delete Tests + run: | + Remove-Item -Recurse -Force Assets\Mirror\Tests + Remove-Item -Recurse -Force Assets\Mirror\Tests.meta + + - name: Delete Examples + run: | + Remove-Item -Recurse -Force Assets\Mirror\Examples + Remove-Item -Recurse -Force Assets\Mirror\Examples.meta + + - name: Setup dotnet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.100' + + - name: Install unity-packer + run: dotnet tool install -g unity-packer + + - name: Package + run: | + unity-packer pack Mirror.unitypackage Assets/Mirror Assets/Mirror Assets/ScriptTemplates Assets/ScriptTemplates LICENSE Assets/Mirror/LICENSE + + - uses: actions/upload-artifact@v1 + with: + name: Mirror.unitypackage + path: Mirror.unitypackage + + - name: Release + uses: cycjimmy/semantic-release-action@v2 + with: + extra_plugins: | + @semantic-release/exec + @semantic-release/changelog + @semantic-release/git + branch: master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml index 3771e21bf..c1b6edea7 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -24,28 +24,13 @@ install: # Do not build on tags (GitHub only) skip_tags: true -before_build: - - cmd: powershell .\setversion.ps1 build_script: - docfx metadata doc\docfx.json - docfx build doc\docfx.json -after_build: - - RMDIR /Q /S Assets\Mirror\Tests - - del /F /Q Assets\Mirror\Tests.meta - - UnityPackager pack Mirror.unitypackage Assets/Mirror Assets/Mirror Assets/ScriptTemplates Assets/ScriptTemplates LICENSE Assets/Mirror/LICENSE - -artifacts: - - path: Mirror.unitypackage - - path: Assets - name: Mirror - - path: Assets - name: ScriptTemplates - image: Visual Studio 2017 deploy_script: - - semantic-release - IF "%APPVEYOR_REPO_BRANCH%"=="master" ( lftp -e 'set ftp:ssl-allow no ; mirror -R -c -e -p doc/_site public_html/docs; chmod -R a+X public_html/docs ; ls -l public_html/docs/ ; ls -l public_html/docs/styles/ ; bye' -u mirreofx --env-password ftp://mirror-networking.com 2>&1 )