Skip to content

A PR to attempt automating NUGET releases. #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,34 +36,12 @@ jobs:
curl -s https://raw.githubusercontent.com/codecov/codecov-bash/master/codecov > codecov
chmod +x codecov
./codecov -t ${CODECOV_TOKEN}
publish:
docker:
- image: mcr.microsoft.com/dotnet/core/sdk:3.1

working_directory: ~/repo

steps:
- checkout
- run: dotnet restore
- run: dotnet pack --configuration release
- run:
name: Publish nuget package
command: |
cd NRedisTimeSeries
dotnet pack --configuration release --output .
dotnet nuget push *.nupkg -k $NugetKey -s https://api.nuget.org/v3/index.json --skip-duplicate

workflows:
version: 2
commit:
jobs:
- build
- publish:
requires:
- build
filters:
branches:
only: master

nightly:
triggers:
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/nuget-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Nuget Release

on:
release:
types: [ published ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'

- name: Install dependencies
run: dotnet restore

- name: Build
run: dotnet pack --configuration Release --output .

- name: Publish to NuGet
uses: rohith/publish-nuget@v2
with:
PROJECT_FILE_PATH: NRedisTimeSeries/NRedisTimeSeries.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}