Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

Commit

Permalink
archive repository
Browse files Browse the repository at this point in the history
  • Loading branch information
brandedoutcast committed Oct 26, 2022
1 parent a04ba48 commit 5c2fdb9
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 98 deletions.
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: Bug Report
about: Create a bug report to help improve this action
title: "[BUG] "
labels: bug
assignees: brandedoutcast

---

**Describe the bug**
Expand All @@ -15,11 +13,13 @@ A URL to the failed action log.

**To Reproduce**
Steps to reproduce the behavior:
1.

1.

**Expected Behavior**
A clear and concise description of what you expected to happen.

**Environment:**
- Platform [e.g. Windows / Linux]
- Action Version [e.g. v2.5.3]

- Platform [e.g. Windows / Linux]
- Action Version [e.g. v2.5.3]
2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: Feature Request
about: Suggest an idea for this action
title: "[FEATURE] "
labels: enhancement
assignees: brandedoutcast

---

**Is your feature request related to a problem? Please describe.**
Expand Down
66 changes: 39 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
## THIS REPOSITORY IS ARCHIVED 😴

> It's time consuming to add features & stay in sync with changes in dotnet world so no new issues / PRs will be accepted
You can replicate the functionality of this action & much more by using the offical tools like dotnet CLI or GitHub CLI etc.,

---

# ✨ Publish NuGet

GitHub action to build, pack & publish nuget packages automatically when a project version is updated

## Usage

Create new `.github/workflows/publish.yml` file:

```yml
Expand Down Expand Up @@ -29,22 +39,22 @@ jobs:
with:
# Filepath of the project to be packaged, relative to root of repository
PROJECT_FILE_PATH: Core/Core.csproj

# Configuration to build and package
# BUILD_CONFIGURATION: Release

# Platform target to compile (default is empty/AnyCPU)
# BUILD_PLATFORM: x64
# BUILD_PLATFORM: x64

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

# 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

Expand All @@ -68,35 +78,37 @@ jobs:

## Inputs

Input | Default Value | Description
--- | --- | ---
PROJECT_FILE_PATH | | Filepath of the project to be packaged, relative to root of repository
BUILD_CONFIGURATION | `Release` | Configuration to build and package
BUILD_PLATFORM | | Platform target to compile
PACKAGE_NAME | | NuGet package id, used for version detection & defaults to project name
VERSION_FILE_PATH | `[PROJECT_FILE_PATH]` | Filepath with version info, relative to root of repository & defaults to PROJECT_FILE_PATH
VERSION_REGEX | `^\s*<Version>(.*)<\/Version>\s*$` | Regex pattern to extract version info in a capturing group
VERSION_STATIC| | Useful with external providers like Nerdbank.GitVersioning, ignores VERSION_FILE_PATH & VERSION_REGEX
TAG_COMMIT | `true` | Flag to toggle git tagging, enabled by default
TAG_FORMAT | `v*` | Format of the git tag, `[*]` gets replaced with actual version
NUGET_KEY | | API key to authenticate with NuGet server
NUGET_SOURCE | `https://api.nuget.org` | NuGet server uri hosting the packages, defaults to https://api.nuget.org
INCLUDE_SYMBOLS | `false` | Flag to toggle pushing symbols along with nuget package to the server, disabled by default
| Input | Default Value | Description |
| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------------------- |
| PROJECT_FILE_PATH | | Filepath of the project to be packaged, relative to root of repository |
| BUILD_CONFIGURATION | `Release` | Configuration to build and package |
| BUILD_PLATFORM | | Platform target to compile |
| PACKAGE_NAME | | NuGet package id, used for version detection & defaults to project name |
| VERSION_FILE_PATH | `[PROJECT_FILE_PATH]` | Filepath with version info, relative to root of repository & defaults to PROJECT_FILE_PATH |
| VERSION_REGEX | `^\s*<Version>(.*)<\/Version>\s*$` | Regex pattern to extract version info in a capturing group |
| VERSION_STATIC | | Useful with external providers like Nerdbank.GitVersioning, ignores VERSION_FILE_PATH & VERSION_REGEX |
| TAG_COMMIT | `true` | Flag to toggle git tagging, enabled by default |
| TAG_FORMAT | `v*` | Format of the git tag, `[*]` gets replaced with actual version |
| NUGET_KEY | | API key to authenticate with NuGet server |
| NUGET_SOURCE | `https://api.nuget.org` | NuGet server uri hosting the packages, defaults to https://api.nuget.org |
| INCLUDE_SYMBOLS | `false` | Flag to toggle pushing symbols along with nuget package to the server, disabled by default |

## Outputs

Output | Description
--- | ---
VERSION | Version of the associated git tag
PACKAGE_NAME | Name of the NuGet package generated
PACKAGE_PATH | Path to the generated NuGet package
SYMBOLS_PACKAGE_NAME | Name of the symbols package generated
SYMBOLS_PACKAGE_PATH | Path to the generated symbols package
| Output | Description |
| -------------------- | ------------------------------------- |
| VERSION | Version of the associated git tag |
| PACKAGE_NAME | Name of the NuGet package generated |
| PACKAGE_PATH | Path to the generated NuGet package |
| SYMBOLS_PACKAGE_NAME | Name of the symbols package generated |
| SYMBOLS_PACKAGE_PATH | Path to the generated symbols package |

**FYI:**

- Outputs may or may not be set depending on the action inputs or if the action failed
- `NUGET_SOURCE` must support `/v3-flatcontainer/PACKAGE_NAME/index.json` for version change detection to work
- Multiple projects can make use of steps to configure each project individually, common inputs between steps can be given as `env` for [job / workflow](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#env)

## License

[MIT](LICENSE)
128 changes: 64 additions & 64 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,76 +1,76 @@
name: Publish NuGet
author: Rohith Reddy (@rohith)
author: R2 (@brandedoutcast)
description: Build, Pack & Publish a NuGet package with dotnet core on project version change

inputs:
PROJECT_FILE_PATH:
description: Filepath of the project to be packaged, relative to root of repository
required: true
BUILD_CONFIGURATION:
description: Configuration to build and package (default is Release)
required: false
default: Release
BUILD_PLATFORM:
description: Platform target to compile (default is empty/AnyCPU)
required: false
default:
NUSPEC_FILE:
description: file path to nuspec file
required: false
default:
PACKAGE_NAME:
description: NuGet package id, used for version detection & defaults to project name
required: false
VERSION_FILE_PATH:
description: Filepath with version info, relative to root of repository & defaults to PROJECT_FILE_PATH
required: false
VERSION_REGEX:
description: Regex pattern to extract version info in a capturing group
required: false
default: ^\s*<(Package|)Version>(.*)<\/(Package|)Version>\s*$
VERSION_STATIC:
description: Useful with external providers like Nerdbank.GitVersioning, ignores VERSION_FILE_PATH & VERSION_REGEX
required: false
TAG_COMMIT:
description: Flag to toggle git tagging, enabled by default
required: false
default: true
TAG_FORMAT:
description: Format of the git tag, [*] gets replaced with actual version
required: false
default: v*
NUGET_KEY:
description: API key to authenticate with NuGet server
required: false
NUGET_SOURCE:
description: NuGet server uri hosting the packages, defaults to https://api.nuget.org
required: false
default: https://api.nuget.org
INCLUDE_SYMBOLS:
description: Flag to toggle pushing symbols along with nuget package to the server, disabled by default
required: false
default: false
PROJECT_FILE_PATH:
description: Filepath of the project to be packaged, relative to root of repository
required: true
BUILD_CONFIGURATION:
description: Configuration to build and package (default is Release)
required: false
default: Release
BUILD_PLATFORM:
description: Platform target to compile (default is empty/AnyCPU)
required: false
default:
NUSPEC_FILE:
description: file path to nuspec file
required: false
default:
PACKAGE_NAME:
description: NuGet package id, used for version detection & defaults to project name
required: false
VERSION_FILE_PATH:
description: Filepath with version info, relative to root of repository & defaults to PROJECT_FILE_PATH
required: false
VERSION_REGEX:
description: Regex pattern to extract version info in a capturing group
required: false
default: ^\s*<(Package|)Version>(.*)<\/(Package|)Version>\s*$
VERSION_STATIC:
description: Useful with external providers like Nerdbank.GitVersioning, ignores VERSION_FILE_PATH & VERSION_REGEX
required: false
TAG_COMMIT:
description: Flag to toggle git tagging, enabled by default
required: false
default: true
TAG_FORMAT:
description: Format of the git tag, [*] gets replaced with actual version
required: false
default: v*
NUGET_KEY:
description: API key to authenticate with NuGet server
required: false
NUGET_SOURCE:
description: NuGet server uri hosting the packages, defaults to https://api.nuget.org
required: false
default: https://api.nuget.org
INCLUDE_SYMBOLS:
description: Flag to toggle pushing symbols along with nuget package to the server, disabled by default
required: false
default: false

outputs:
VERSION:
description: Version of the associated git tag
VERSION:
description: Version of the associated git tag

PACKAGE_NAME:
description: Name of the NuGet package generated

PACKAGE_PATH:
description: Path to the generated NuGet package
PACKAGE_NAME:
description: Name of the NuGet package generated

SYMBOLS_PACKAGE_NAME:
description: Name of the symbols package generated

SYMBOLS_PACKAGE_PATH:
description: Path to the generated symbols package
PACKAGE_PATH:
description: Path to the generated NuGet package

SYMBOLS_PACKAGE_NAME:
description: Name of the symbols package generated

SYMBOLS_PACKAGE_PATH:
description: Path to the generated symbols package

runs:
using: node12
main: index.js
using: node12
main: index.js

branding:
icon: package
color: blue
icon: package
color: blue

0 comments on commit 5c2fdb9

Please sign in to comment.