mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
ci: Release only if tests pass (#1692)
Now we only create a release if the tests pass. This is done by moving the release steps from appveyor to github actions.
This commit is contained in:
parent
18bd792a0b
commit
fbe7118689
@ -135,3 +135,7 @@ csharp_preserve_single_line_blocks = true
|
|||||||
[*.vb]
|
[*.vb]
|
||||||
# Modifier preferences
|
# 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
|
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
|
53
.github/workflows/main.yml
vendored
53
.github/workflows/main.yml
vendored
@ -30,8 +30,8 @@ jobs:
|
|||||||
name: Manual Activation File
|
name: Manual Activation File
|
||||||
path: ${{ steps.getManualLicenseFile.outputs.filePath }}
|
path: ${{ steps.getManualLicenseFile.outputs.filePath }}
|
||||||
|
|
||||||
testRunnerInAllModes:
|
CI:
|
||||||
name: Unity test
|
name: Test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
||||||
@ -43,7 +43,7 @@ jobs:
|
|||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Add Coverage Plugin
|
- name: Add Coverage Plugin
|
||||||
uses: canastro/copy-action@0.0.2
|
uses: canastro/copy-action@0.0.2
|
||||||
with:
|
with:
|
||||||
@ -100,3 +100,50 @@ jobs:
|
|||||||
FrameworkPathOverride: /opt/Unity/Editor/Data/MonoBleedingEdge/
|
FrameworkPathOverride: /opt/Unity/Editor/Data/MonoBleedingEdge/
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_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 }}
|
15
appveyor.yml
15
appveyor.yml
@ -24,28 +24,13 @@ install:
|
|||||||
|
|
||||||
# Do not build on tags (GitHub only)
|
# Do not build on tags (GitHub only)
|
||||||
skip_tags: true
|
skip_tags: true
|
||||||
before_build:
|
|
||||||
- cmd: powershell .\setversion.ps1
|
|
||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- docfx metadata doc\docfx.json
|
- docfx metadata doc\docfx.json
|
||||||
- docfx build 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
|
image: Visual Studio 2017
|
||||||
|
|
||||||
deploy_script:
|
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 )
|
- 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 )
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user