Skip to content

MyFitnessPal.Data

MyFitnessPal.Data #35

name: MyFitnessPal.Data
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
create:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.101
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build MyFitnessPal.Data/MyFitnessPal.Data.csproj
- name: Pack
run: dotnet pack MyFitnessPal.Data/MyFitnessPal.Data.csproj --configuration=Release
- uses: actions/upload-artifact@v2
with:
name: nupkg
path: MyFitnessPal.Data/nupkg/**/*.nupkg
release:
name: Release
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/release-')
steps:
- name: Setup NuGet.exe for use with actions
uses: NuGet/[email protected]
with:
nuget-api-key: ${{ secrets.NUGET_API_KEY }}
- uses: actions/[email protected]
with:
name: nupkg
- name: Publish
run: nuget push /**/*.nupkg -Source https://www.nuget.org