Skip to content

New Properties for classes #109

New Properties for classes

New Properties for classes #109

Workflow file for this run

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@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.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@v2
with:
name: TestResults
path: ./TestResults/*
if: ${{ always() }}
- name: Upload artifacts
uses: actions/upload-artifact@v2
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@v1
with:
name: nupkg
- 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
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@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
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