Create test.yml
This commit is contained in:
1 parent
95a0cd6e58
commit
4ee4e74f46
1 file changed
+59
@@ -0,0 +1,59 @@
|
|||||||
|
name: Build and Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- develop
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- develop
|
||||||
|
- main
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup .NET
|
||||||
|
uses: actions/setup-dotnet@v3
|
||||||
|
with:
|
||||||
|
dotnet-version: '6.0.x'
|
||||||
|
|
||||||
|
- name: Restore dependencies
|
||||||
|
run: dotnet restore
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: dotnet build --configuration Release --no-restore
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: dotnet test --no-build --verbosity normal
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
if: github.ref == 'refs/heads/develop' && github.event_name == 'push'
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
bin/Release/net6.0-windows/OBSLauncher.exe
|
||||||
|
bin/Release/net6.0-windows/OBSLauncher.dll
|
||||||
|
bin/Release/net6.0-windows/OBSLauncher.pdb
|
||||||
|
tag_name: v${{ github.run_number }}
|
||||||
|
name: Release v${{ github.run_number }}
|
||||||
|
body: |
|
||||||
|
Автоматически созданный релиз версии ${{ github.run_number }}
|
||||||
|
|
||||||
|
### Изменения
|
||||||
|
- Автоматическая сборка
|
||||||
|
- Тестирование
|
||||||
|
- Создание релиза
|
||||||
|
draft: false
|
||||||
|
prerelease: true
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
Reference in new issue
Block a user