Skip to content

Commit

Permalink
Release Gossip (#4)
Browse files Browse the repository at this point in the history
* release Gossip

* add LICENSE to csproj

* correct file path
  • Loading branch information
DanCNo authored Dec 13, 2021
1 parent 8e10ffc commit 0c647c2
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish to NuGet

on:
push:
branches:
- main

jobs:
publish:

runs-on: ubuntu-latest
environment:
name: "Publish Release"

steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Restore Dependencies
run: dotnet restore src
- name: Build
run: dotnet build src --configuration Release --no-restore
- name: Publish NuGet
uses: brandedoutcast/[email protected]
with:
PROJECT_FILE_PATH: src/Gossip.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
36 changes: 36 additions & 0 deletions .github/workflows/publish_preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish Preview to NuGet

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+-preview-[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-alpha-[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-beta-[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-prerelease-[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-rc-[0-9]+"

jobs:
preview:

runs-on: ubuntu-latest
environment:
name: "Publish Preview"

steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Restore Dependencies
run: dotnet restore src
- name: Build
run: dotnet build src --configuration Release --no-restore
- name: Set VERSION variable from tag
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
- name: Pack NuGet
run: dotnet pack src/Gossip.csproj --no-build --configuration Release /p:Version=${VERSION} --output src
- name: Publish NuGet
run: dotnet nuget push src/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${NUGET_KEY} --skip-duplicate
env:
NUGET_KEY: ${{ secrets.NUGET_API_KEY }}
16 changes: 16 additions & 0 deletions src/Gossip.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>0.1.0</Version>
<Authors>Wayfair</Authors>
<Description>Extends the functionality of Dapper and allows performing database queries in .NET easily and quickly</Description>
<Copyright>Wayfair ©2021</Copyright>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageProjectUrl>https://github.com/wayfair-incubator/Gossip</PackageProjectUrl>
<RepositoryUrl>https://github.com/wayfair-incubator/Gossip</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>database, queries, dapper, gossip</PackageTags>
</PropertyGroup>
<ItemGroup>
<None Include="..\LICENSE">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Dapper" Version="2.0.123" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
Expand Down

0 comments on commit 0c647c2

Please sign in to comment.