Build #31
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 | |
| on: | |
| pull_request: | |
| branches: [ 'rhino-9.x' ] | |
| workflow_dispatch: | |
| env: | |
| RHINO_TOKEN: ${{ secrets.RHINO_TOKEN }} | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Get token | |
| id: my-app | |
| uses: getsentry/action-github-app-token@v3 | |
| with: | |
| app_id: ${{ secrets.MERGE_DOWN_APP_ID }} | |
| private_key: ${{ secrets.MERGE_DOWN_APP_PRIVATE_KEY }} | |
| - name: Enable Auto-Merge | |
| if: (github.event_name == 'pull_request') | |
| uses: kenhowardpdx/auto-merge-action@v1 | |
| with: | |
| token: ${{ steps.my-app.outputs.token }} | |
| - name: Install dotnet 9.0 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '9.0.x' | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Build | |
| run: dotnet build -c Release Rhino.Testing.sln | |
| - name: Install Rhino WIP | |
| uses: mcneel/setup-rhino3d@v2 | |
| id: setup_rhino | |
| with: | |
| release-version: wip | |
| email-address: ${{ secrets.EMAIL_ADDRESS }} | |
| - name: Run Tests (net48) | |
| shell: pwsh | |
| run: dotnet test --framework net48 | |
| - name: Run Tests (net9.0-windows) | |
| shell: pwsh | |
| run: dotnet test --framework net9.0-windows | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: rhinotesting-nupkg | |
| path: src/build/*.nupkg | |
| publish: | |
| needs: [ build ] | |
| runs-on: ubuntu-latest | |
| if: (github.event_name == 'workflow_dispatch') | |
| steps: | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: rhinotesting-nupkg | |
| - name: Push packages to nuget.org | |
| run: dotnet nuget push '*.nupkg' --skip-duplicate -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} |