Skip to content

Commit

Permalink
Added release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rgvlee committed Apr 24, 2021
1 parent 3cac5aa commit 1dbb10f
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release

on:
release:
types: [published]

jobs:
build-and-test:
name: Build, pack and push
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: 2.1.x

- name: Setup NuGet
uses: nuget/setup-nuget@v1
with:
nuget-version: latest

- name: Restore dependencies
run: dotnet restore src

- name: Build
run: dotnet build src --configuration Release --no-restore

- name: Pack
run: |
nuget pack EntityFrameworkCore.Testing.Moq.nuspec -Version ${{ github.event.release.name }} -Symbols -SymbolPackageFormat snupkg
nuget pack EntityFrameworkCore.Testing.NSubstitute.nuspec -Version ${{ github.event.release.name }} -Symbols -SymbolPackageFormat snupkg
- name: Push
run: |
nuget push EntityFrameworkCore.Testing.Moq*.nupkg -Source https://api.nuget.org/v3/index.json -ApiKey ${{ secrets.NUGET_API_KEY }}
nuget push EntityFrameworkCore.Testing.NSubstitute*.nupkg -Source https://api.nuget.org/v3/index.json -ApiKey ${{ secrets.NUGET_API_KEY }}
1 change: 1 addition & 0 deletions src/EntityFrameworkCore.Testing.sln
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EntityFrameworkCore.Testing.Moq\EntityFrameworkCore.Testing.Moq.xml = EntityFrameworkCore.Testing.Moq\EntityFrameworkCore.Testing.Moq.xml
EntityFrameworkCore.Testing.NSubstitute\EntityFrameworkCore.Testing.NSubstitute.xml = EntityFrameworkCore.Testing.NSubstitute\EntityFrameworkCore.Testing.NSubstitute.xml
..\.github\workflows\continuous-integration-checks.yml = ..\.github\workflows\continuous-integration-checks.yml
..\.github\workflows\release.yml = ..\.github\workflows\release.yml
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EntityFrameworkCore.Testing.Moq", "EntityFrameworkCore.Testing.Moq\EntityFrameworkCore.Testing.Moq.csproj", "{3A00A558-6614-4D2C-8BC0-A74EFBB8F844}"
Expand Down

0 comments on commit 1dbb10f

Please sign in to comment.