Skip to content

Commit

Permalink
create build and release workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
vigneshmsft authored Nov 6, 2020
1 parent c44e874 commit 09502fc
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 3 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build

on:
push:
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest

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

- name: Use .NET Core 3.1.301
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.301

- name: dotnet restore
run: dotnet restore /nologo

- name: dotnet build
run: dotnet build -c Release --no-restore --nologo
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release

on:
release:
types: [published]

jobs:
publish_nuget:
if: ${{ github.event.release.target_commitish == 'master' && !github.event.release.draft}}
runs-on: ubuntu-latest

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

- name: Use .NET Core 3.1.301
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.301

- name: dotnet restore
run: dotnet restore /nologo

- name: dotnet build & pack
run: |
dotnet build -c Release --no-restore --nologo
dotnet pack Spry/Spry.csproj -c Release --no-build --nologo -o package
- name: dotnet push to NuGet
working-directory: package
run: |
dotnet nuget push ${PACKAGE_NAME} --api-key ${NUGET_API_KEY} --source https://api.nuget.org/v3/index.json
env:
PACKAGE_NAME: ${{ format('Spry.{0}.nupkg', github.event.release.tag_name) }}
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
6 changes: 3 additions & 3 deletions Spry/Spry.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

<PropertyGroup>
<TargetFramework>netstandard20</TargetFramework>
<Version>1.0.4</Version>
<Version>1.0.6</Version>
<Authors>Vignesh.N</Authors>
<PackageLicenseUrl>https://github.com/vigneshmsft/Spry/blob/master/LICENSE</PackageLicenseUrl>
<License>https://github.com/vigneshmsft/Spry/blob/master/LICENSE</License>
<PackageProjectUrl>https://github.com/vigneshmsft/Spry</PackageProjectUrl>
<RepositoryUrl>https://github.com/vigneshmsft/Spry</RepositoryUrl>
<PackageTags>dapper spry database micro-orm orm sql-server sql query-builder fluent-query-builder query dapper-extensions</PackageTags>
<Description>Spry - fluent CRUD queries using Dapper</Description>
<PackageReleaseNotes>v1.0.4 updating to .NET Standard.</PackageReleaseNotes>
<PackageReleaseNotes>v1.0.6</PackageReleaseNotes>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 09502fc

Please sign in to comment.