Merge pull request #172 from avgalex/master #112
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and publish | |
| on: | |
| workflow_dispatch: # Ручной запуск | |
| push: | |
| branches: [ master ] # Запуск при пуше в master | |
| pull_request: | |
| branches: [ master ] # Запуск для pull_request в master | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| steps: | |
| # Шаг 1: Клонируем репозиторий | |
| - uses: actions/checkout@v3 | |
| # Шаг 2: Устанавливаем .NET SDK | |
| - name: Setup .NET SDK | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: | | |
| 8.0.x | |
| 9.0.x | |
| - name: Build Windows | |
| if: runner.os == 'Windows' | |
| run: | | |
| ./build.ps1 --target=Travis --verbosity=normal --ForceUploadPackages=false | |
| shell: powershell | |
| # Шаг 3: Сборка проекта | |
| - name: Build | |
| if: runner.os == 'Linux' | |
| env: | |
| UPLOAD_NUGET: ${{ secrets.UPLOAD_NUGET }} | |
| UPLOAD_NUGET_API_KEY: ${{ secrets.UPLOAD_NUGET_API_KEY }} | |
| run: | | |
| chmod a+x ./build.sh | |
| ./build.sh --target=Travis --verbosity=normal --ForceUploadPackages=true |