Skip to content

Commit 73a1eba

Browse files
author
AndrewMorgan1
committed
2 parents a0c3220 + 8f5f2ce commit 73a1eba

2 files changed

Lines changed: 25 additions & 1 deletion

File tree

.github/workflows/dotnet.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: .NET Build, Test & Coverage
33
on:
44
push:
55
branches: [ master ]
6+
tags:
7+
- 'v*' # run on version tags like v0.1.0
68
pull_request:
79
branches: [ master ]
810

@@ -33,3 +35,23 @@ jobs:
3335
with:
3436
files: ./tests/ByteFlow.Tests/TestResults/**/*.xml
3537
token: ${{ secrets.CODECOV_TOKEN }}
38+
39+
publish:
40+
runs-on: ubuntu-latest
41+
needs: build
42+
if: startsWith(github.ref, 'refs/tags/v') # only run on tags starting with v
43+
44+
steps:
45+
- name: Checkout
46+
uses: actions/checkout@v3
47+
48+
- name: Setup .NET
49+
uses: actions/setup-dotnet@v3
50+
with:
51+
dotnet-version: '8.0.x'
52+
53+
- name: Pack
54+
run: dotnet pack ./src/ByteFlow/ByteFlow/ByteFlow.csproj -c Release -o ./nupkgs
55+
56+
- name: Publish to NuGet
57+
run: dotnet nuget push "./nupkgs/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# ByteFlow.Net
22

3-
[![NuGet](https://img.shields.io/nuget/v/ByteFlow.Net.svg)](https://www.nuget.org/packages/ByteFlow.Net)
43
[![Build](https://github.com/AndrewClements84/ByteFlow.Net/actions/workflows/dotnet.yml/badge.svg)](https://github.com/AndrewClements84/ByteFlow.Net/actions)
54
[![codecov](https://codecov.io/gh/AndrewClements84/ByteFlow.Net/branch/master/graph/badge.svg)](https://codecov.io/gh/AndrewClements84/ByteFlow.Net)
5+
[![NuGet](https://img.shields.io/nuget/v/ByteFlow.Net.svg)](https://www.nuget.org/packages/ByteFlow.Net)
6+
[![NuGet Downloads](https://img.shields.io/nuget/dt/ByteFlow.Net.svg)](https://www.nuget.org/packages/ByteFlow.Net)
7+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE.txt)
68

79
A lightweight .NET library for converting bytes into **human-readable formats** (KB, MB, GB, etc.) and back again.
810

0 commit comments

Comments
 (0)