Skip to content

Commit 36fb35a

Browse files
authored
Use github actions for build and publish (#300)
1 parent eef9506 commit 36fb35a

File tree

4 files changed

+54
-90
lines changed

4 files changed

+54
-90
lines changed

.github/workflows/build.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This workflow will build a .NET project
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
3+
4+
name: Build and Test
5+
6+
on:
7+
push:
8+
branches: [ "develop", "master" ]
9+
pull_request:
10+
branches: [ "develop", "master" ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: windows-latest
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Setup .NET
20+
uses: actions/setup-dotnet@v3
21+
with:
22+
dotnet-version: 6.0.x
23+
- name: Restore dependencies
24+
run: dotnet restore
25+
- name: Build
26+
run: dotnet build -c Release --no-restore
27+
- name: Test
28+
run: dotnet test -c Release --no-build --verbosity normal

.github/workflows/publish.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags: any
6+
7+
jobs:
8+
publish:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Setup .NET
15+
uses: actions/setup-dotnet@v3
16+
with:
17+
dotnet-version: 6.0.x
18+
- name: Restore dependencies
19+
run: dotnet restore
20+
- name: Build
21+
run: dotnet build -c Release --no-restore /p:PackageVersion=${{ github.ref_name }}
22+
- name: Publish NuGet
23+
run: dotnet nuget push **.nupkg -k ${NUGET_TOKEN} --skip-duplicate
24+
env:
25+
NUGET_TOKEN: ${{ secrets.NUGET_API_KEY }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# ClosedXML.Report
2-
[![Build status](https://ci.appveyor.com/api/projects/status/y2ha69ggalbj1y47/branch/develop?svg=true)](https://ci.appveyor.com/project/ClosedXML/closedxml-report/branch/develop/artifacts)
2+
[![Build status](https://github.com/ClosedXML/ClosedXML.Report/actions/workflows/build.yml/badge.svg?branch=develop)
33
[![Open Source Helpers](https://www.codetriage.com/closedxml/closedxml.report/badges/users.svg)](https://www.codetriage.com/closedxml/closedxml.report)
44
[![NuGet Badge](https://buildstats.info/nuget/ClosedXML.Report)](https://www.nuget.org/packages/ClosedXML.Report/)
55
[![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square)](#contributors)

appveyor.yml

Lines changed: 0 additions & 89 deletions
This file was deleted.

0 commit comments

Comments
 (0)