Skip to content

Commit

Permalink
Updated github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm360 committed Jul 5, 2020
1 parent 2d6c4fd commit 547eeef
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 2 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/myget-feature-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build and package feature branch. Deploy to MyGet

on:
push:
branches:
- 'feature/**'

jobs:
build-test-package:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
with:
fetch-depth: 0

- name: Setup .NET Core SDK
uses: actions/setup-dotnet@master
with:
dotnet-version: '3.1.x'

- name: Build with dotnet
run: dotnet build --configuration Release

- name: Generate nuget package
run: dotnet pack --configuration Release -o nupkg

- name: Push packages
run: dotnet nuget push './nupkg/*.nupkg' --api-key ${{secrets.MYGET_APIKEY}} --source https://www.myget.org/F/etherna/api/v3/index.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build test and package .Net Core library - MongODM
name: Build test and package dev and master branch. Deploy to MyGet

on:
push:
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/nuget-release-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build test and package master branch. Deploy to NuGet

on:
push:
branches: master

jobs:
build-test-package:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
with:
fetch-depth: 0

- name: Setup .NET Core SDK
uses: actions/setup-dotnet@master
with:
dotnet-version: '3.1.x'

- name: Build with dotnet
run: dotnet build --configuration Release

- name: Run unit tests
run: dotnet test --configuration Release

- name: Generate nuget package
run: dotnet pack --configuration Release -o nupkg

- name: Push packages
run: dotnet nuget push './nupkg/*.nupkg' --api-key ${{secrets.NUGET_KEY}} --source https://api.nuget.org/v3/index.json
4 changes: 3 additions & 1 deletion MongODM.sln
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{D4BB5972-5F7B-43ED-81C1-69ECF0E62D1E}"
ProjectSection(SolutionItems) = preProject
.github\workflows\build-test-package.yml = .github\workflows\build-test-package.yml
.github\workflows\myget-feature-deploy.yml = .github\workflows\myget-feature-deploy.yml
.github\workflows\myget-stable-deploy.yml = .github\workflows\myget-stable-deploy.yml
.github\workflows\nuget-release-deploy.yml = .github\workflows\nuget-release-deploy.yml
EndProjectSection
EndProject
Global
Expand Down

0 comments on commit 547eeef

Please sign in to comment.