Skip to content

Download code.

Download code. #402

Workflow file for this run

name: .NET
on:
push:
branches: [ main, dev/* ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.x'
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
6.0.x
7.0.x
- name: Restore dependencies
run: dotnet restore
working-directory: uSync.Migrations
- name: Determine Version with GitVersion (MSBuild in Proj will do this)
id: gitversion
uses: gittools/actions/gitversion/[email protected]
with:
useConfigFile: true
configFilePath: ./GitVersion.yml
- name: Build
run: dotnet build --no-restore
working-directory: uSync.Migrations
- name: Test
run: dotnet test
working-directory: uSync.Migrations.Tests
- name: Dotnet Pack (Core)
run: dotnet pack --output ../build.out/ /p:version=${{ steps.gitversion.outputs.fullSemVer }}
working-directory: uSync.Migrations.Core
- name: Dotnet Pack (Client)
run: dotnet pack --output ../build.out/ /p:version=${{ steps.gitversion.outputs.fullSemVer }}
working-directory: uSync.Migrations.Client
- name: Dotnet Pack (Migrators)
run: dotnet pack --output ../build.out/ /p:version=${{ steps.gitversion.outputs.fullSemVer }}
working-directory: uSync.Migrations.Migrators
- name: Dotnet Pack (Main package)
run: dotnet pack --output ../build.out/ /p:version=${{ steps.gitversion.outputs.fullSemVer }}
working-directory: uSync.Migrations
- name: Upload nuget file as build artifact
uses: actions/upload-artifact@v2
with:
name: Nuget Build Output
path: ./build.out/
- name: Push to GitHub Nuget Repo
if: ${{ github.event_name != 'pull_request' }}
run: dotnet nuget push ./build.out/*.nupkg --skip-duplicate --source https://nuget.pkg.github.com/jumoo/index.json --api-key ${{ github.token }}