Merge pull request #1368 from diadoc/edop-1386-multisided-public-api #684
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
| on: | |
| push: | |
| paths-ignore: | |
| - "**/*.md" | |
| jobs: | |
| build_and_test: | |
| runs-on: windows-2022 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 6.x | |
| - name: Run the build script | |
| uses: cake-build/cake-action@v2 | |
| env: | |
| diadoc_signing_secret: ${{ secrets.DIADOC_SIGNING_SECRET }} | |
| github_ref_type: ${{ github.ref_type }} | |
| with: | |
| target: Default | |
| arguments: | | |
| configuration: Release | |
| verbosity: Diagnostic | |
| cake-version: 2.3.0 | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: packages | |
| path: | | |
| bin/Release/*.nupkg | |
| bin/Release/*.zip | |
| if-no-files-found: error | |
| publish: | |
| runs-on: ubuntu-22.04 | |
| needs: build_and_test | |
| if: startsWith(github.ref, 'refs/tags/version') | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check if tag is on master branch | |
| run: | | |
| # Получаем ветку, на которой находится этот тег | |
| TAG_BRANCH=$(git branch -r --contains ${{ github.ref }} | grep -E 'origin/(master|main)' || true) | |
| if [ -z "$TAG_BRANCH" ]; then | |
| echo "❌ Tag ${{ github.ref_name }} is not on master/main branch" | |
| echo "Current tag branches:" | |
| git branch -r --contains ${{ github.ref }} | |
| exit 1 | |
| fi | |
| echo "✅ Tag is on master branch" | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v2 | |
| with: | |
| dotnet-version: 6.x | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: packages | |
| - name: Create github release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| fail_on_unmatched_files: true | |
| draft: false | |
| prerelease: false | |
| files: | | |
| **/*.nupkg | |
| **/*.zip | |
| - name: Push NuGet package | |
| run: | | |
| dotnet nuget push "**/*.nupkg" --source ${{ secrets.NUGET_SOURCE }} --api-key ${{ secrets.NUGET_KEY }} |