Skip to content

Commit

Permalink
adding publish action (#19)
Browse files Browse the repository at this point in the history
* adding publish action

* adding github action to publish to nuget

* update csproj and nuspec

* add missing space to yml
  • Loading branch information
brendanconnolly committed Jun 16, 2021
1 parent dd35aac commit fbaa2ea
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 7 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: publish to nuget
on:
push:
branches:
- master # Default release branch
jobs:
publish:
name: build, pack & publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

# - name: Setup dotnet
# uses: actions/setup-dotnet@v1
# with:
# dotnet-version: 3.1.200

# Publish
- name: publish on version change
id: publish_nuget
uses: rohith/publish-nuget@v2
with:
# Filepath of the project to be packaged, relative to root of repository
PROJECT_FILE_PATH: src/Xunit.Categories/Xunit.Categories.csproj

# NuGet package id, used for version detection & defaults to project name
PACKAGE_NAME: xunit.categories

# Filepath with version info, relative to root of repository & defaults to PROJECT_FILE_PATH
# VERSION_FILE_PATH: Directory.Build.props

# Regex pattern to extract version info in a capturing group
VERSION_REGEX: ^\s*<Version>(.*)<\/Version>\s*$

# Useful with external providers like Nerdbank.GitVersioning, ignores VERSION_FILE_PATH & VERSION_REGEX
# VERSION_STATIC: 1.0.0

# Flag to toggle git tagging, enabled by default
# TAG_COMMIT: true

# Format of the git tag, [*] gets replaced with actual version
# TAG_FORMAT: v*

# API key to authenticate with NuGet server
NUGET_KEY: ${{secrets.NUGET_API_KEY}}

# NuGet server uri hosting the packages, defaults to https://api.nuget.org
NUGET_SOURCE: https://api.nuget.org

# Flag to toggle pushing symbols along with nuget package to the server, disabled by default
# INCLUDE_SYMBOLS: false
9 changes: 5 additions & 4 deletions src/Xunit.Categories/Xunit.Categories.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@
<Authors>Brendan Connolly</Authors>
<Company>Brendan Connolly</Company>
<Description>Friendly Traits for Xunit</Description>
<Version>2.0.4</Version>
<FileVersion>2.0.4</FileVersion>
<Version>2.0.5</Version>
<FileVersion>2.0.5</FileVersion>
<PackageId>xunit.categories</PackageId>
<PackageVersion>2.0.4</PackageVersion>
<PackageVersion>2.0.5</PackageVersion>
<PackageReleaseNotes>
2.0.5 - update to xunit 2.4.1
2.0.4 - Support netstandard2
2.0.3 - Adding System Test Attribute
2.0.2 - Update project to netstandard1.1, include new categories</PackageReleaseNotes>
<PackageProjectUrl>https://github.com/brendanconnolly/Xunit.Categories</PackageProjectUrl>
<Copyright>Copyright 2019</Copyright>
<Copyright>Copyright 2021</Copyright>
<PackageTags>Xunit xunit test category categories trait</PackageTags>
<TargetFrameworks>netstandard1.1;netstandard2.0</TargetFrameworks>
</PropertyGroup>
Expand Down
6 changes: 3 additions & 3 deletions src/Xunit.Categories/Xunit.Categories.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>$description$</description>

<copyright>Copyright 2019</copyright>
<tags>Xunit xunit test category categories trait</tags>
<copyright>Copyright 2021</copyright>
<tags>Xunit xunit test category categories trait </tags>
</metadata>
</package>
</package>

0 comments on commit fbaa2ea

Please sign in to comment.