Adjustments for unlisted videos via secret Issue#212 #130
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: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| release: | |
| types: | |
| - published | |
| env: | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| jobs: | |
| build: | |
| if: github.event_name != 'release' | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --no-restore | |
| - name: Pack | |
| run: dotnet pack --verbosity normal --no-restore --include-symbols --include-source -p:PackageVersion=3.0.0-preview.${{ github.run_id }} src/VimeoDotNet/VimeoDotNet.csproj | |
| - name: Test | |
| run: dotnet test --no-build --verbosity normal -l html --results-directory:"TestResults" | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: TestResults | |
| path: ./TestResults/* | |
| if: ${{ always() }} | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: nupkg | |
| path: ./src/VimeoDotNet/bin/Release/*.nupkg | |
| prerelease: | |
| needs: build | |
| if: github.ref == 'refs/heads/master' && github.event_name != 'release' | |
| runs-on: ubuntu-latest | |
| env: | |
| GITHUB_USER: mfilippov | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GITHUB_FEED: https://nuget.pkg.github.com/mfilippov | |
| steps: | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: nupkg | |
| - name: Push to GitHub Feed | |
| run: | | |
| for f in ./*.nupkg | |
| do | |
| curl -vX PUT -u "$GITHUB_USER:$GITHUB_TOKEN" -F package=@$f $GITHUB_FEED | |
| done | |
| deploy: | |
| if: github.event_name == 'release' | |
| runs-on: ubuntu-latest | |
| env: | |
| GITHUB_USER: mfilippov | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GITHUB_FEED: https://nuget.pkg.github.com/mfilippov | |
| NUGET_FEED: https://api.nuget.org/v3/index.json | |
| NUGET_KEY: ${{ secrets.NUGET_KEY }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: 7.0.x | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Create Release NuGet package | |
| run: | | |
| arrTag=(${GITHUB_REF//\// }) | |
| VERSION="${arrTag[2]}" | |
| echo Version: $VERSION | |
| VERSION="${VERSION//v}" | |
| echo Clean Version: $VERSION | |
| dotnet pack -v normal -c Release --include-symbols --include-source -p:PackageVersion=$VERSION -o nupkg src/VimeoDotNet/VimeoDotNet.csproj | |
| - name: Push to GitHub Feed | |
| run: | | |
| for f in ./nupkg/*.nupkg | |
| do | |
| curl -vX PUT -u "$GITHUB_USER:$GITHUB_TOKEN" -F package=@$f $GITHUB_FEED | |
| done | |
| - name: Push to NuGet Feed | |
| run: dotnet nuget push ./nupkg/*.nupkg --source $NUGET_FEED --skip-duplicate --api-key $NUGET_KEY |