Skip to content

Commit e9848da

Browse files
committed
Updated to .NET 6 and created a multi-platform Docker image as the only
deployment. Removed DotNet tool and Chocolatey package deployments. Removed AppVeyor CI, now using GitHub Actions.
1 parent aca8965 commit e9848da

21 files changed

Lines changed: 244 additions & 206 deletions

.github/workflows/main.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: Deploy
4+
5+
# Controls when the workflow will run
6+
on:
7+
push:
8+
tags:
9+
- '*' # Push events to every tag
10+
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
13+
14+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
15+
jobs:
16+
# This workflow contains a single job called "build"
17+
build:
18+
# The type of runner that the job will run on
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v3
24+
25+
- name: Login to Docker Hub
26+
uses: docker/login-action@v1
27+
with:
28+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
29+
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
30+
31+
- name: Set up Docker Buildx
32+
uses: docker/setup-buildx-action@v1
33+
34+
- name: Build and push
35+
uses: docker/build-push-action@v2
36+
with:
37+
file: ./src/PullRequestReleaseNotes/Dockerfile
38+
context: ./src/PullRequestReleaseNotes
39+
push: true
40+
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/pullrequestreleasenotes:latest
41+
cache-from: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/pullrequestreleasenotes:buildcache
42+
cache-to: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/pullrequestreleasenotes:buildcache,mode=max

.github/workflows/test.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: Test
4+
5+
# Controls when the workflow will run
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the "master" branch
8+
push:
9+
branches: [ "master" ]
10+
pull_request:
11+
branches: [ "master" ]
12+
13+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
14+
jobs:
15+
# This workflow contains a single job called "build"
16+
build:
17+
# The type of runner that the job will run on
18+
runs-on: windows-latest
19+
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v3
23+
24+
- name: Setup .NET Core
25+
uses: actions/setup-dotnet@v2
26+
with:
27+
dotnet-version: '6.0.x'
28+
29+
- name: Test
30+
run: dotnet test src/PullRequestReleaseNotes.Tests/PullRequestReleaseNotes.Tests.csproj --verbosity normal
31+

GitVersion.yml

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

README.md

Lines changed: 26 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,55 +3,51 @@
33
Pull Request Release Notes
44
==========================
55

6-
[![Build status](https://ci.appveyor.com/api/projects/status/github/jasminsehic/pullrequestreleasenotes?svg=true)](https://ci.appveyor.com/project/jasminsehic/unreleasedgithubhistory)
7-
[![Nuget](https://img.shields.io/nuget/v/PullRequestReleaseNotes.DotNetCore.svg)](https://www.nuget.org/packages/PullRequestReleaseNotes.DotNetCore)
8-
[![Chocolatey](https://img.shields.io/chocolatey/vpre/PullRequestReleaseNotes.svg)](https://chocolatey.org/packages/PullRequestReleaseNotes)
6+
[![Test](https://github.com/jasminsehic/PullRequestReleaseNotes/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/jasminsehic/PullRequestReleaseNotes/actions/workflows/test.yml)
7+
[![Deploy](https://github.com/jasminsehic/PullRequestReleaseNotes/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/jasminsehic/PullRequestReleaseNotes/actions/workflows/main.yml)
98
[![Release](https://img.shields.io/github/release/jasminsehic/PullRequestReleaseNotes.svg)](https://github.com/jasminsehic/PullRequestReleaseNotes/releases)
109
[![License](https://img.shields.io/github/license/jasminsehic/PullRequestReleaseNotes.svg)](https://github.com/jasminsehic/PullRequestReleaseNotes/blob/master/LICENSE)
1110
[![Gitter](https://badges.gitter.im/jasminsehic/PullRequestReleaseNotes.svg)](https://gitter.im/jasminsehic/PullRequestReleaseNotes)
1211

13-
Pull Request Release Notes utility generates release notes for all merged pull requests, on a specific branch, that have not yet been released relying solely on pull request titles and labels to generate the release notes and publish them in markdown format.
12+
Pull Request Release Notes utility generates release notes for all merged pull requests that have not been released relying on pull request titles and labels to generate and publish release notes.
1413

1514
Supported Pull Request providers are [GitHub](https://github.com/), [GitLab](https://gitlab.com/), [Azure DevOps Services / Server](https://azure.microsoft.com/en-au/services/devops/), [BitBucket Cloud](https://bitbucket.org/) and [Bitbucket Server](https://www.atlassian.com/software/bitbucket/download).
1615

17-
Intention is to run this utility as part of a continuous integration process and generate notes automatically as part of every release branch build. Optionally the utility can also publish the notes to a markdown file, [Atlassian Confluence](https://www.atlassian.com/software/confluence) page or a [Slack](https://slack.com/) post.
16+
You can run this as part of CI process and generate notes automatically as part of every release. You can also publish notes to a markdown file, [Atlassian Confluence](https://www.atlassian.com/software/confluence) page or a [Slack](https://slack.com/) post.
1817

1918
## Command line, YAML file parameters and Environment variables
2019
See [HELP.md](https://github.com/jasminsehic/PullRequestReleaseNotes/blob/master/docs/HELP.md) for details on parameters.
2120

22-
## Release Notes Format
23-
24-
Utility outputs release notes following the [Semantic Release Notes](https://web.archive.org/web/20161013175123/http://www.semanticreleasenotes.org/) format and extracts semantic release note sections, categories and summaries from the pull request title and labels. For example all pull requests with `Bug` label can be grouped under `Fixes` section and pull requests with `Enhancement` label can be grouped under `Enhancements` section. Category grouping is possible through use of the `#Label` where `#` character is used to denote a category label as opposed to a section label. BitBucket Cloud / Server pull request providers do not have a label concept yet so for those providers you can type `[#section]` and `[##category]` either in the title or the description of the pull request as a pseudo-label.
25-
26-
Release note formatting can be further customised where you can turn off grouping by section and category, order the release notes based on merged or created time of pull request and the format of the release note itself. Version number can be supplied via [GitVersion](https://github.com/GitTools/GitVersion) tool.
27-
28-
You can also define a label to exclude pull request from release notes. Also you can define a label that when not added to a pull request will add a release note highlighted as code. This can be useful for scenarios such as QA team adding a QC label to a pull request so then it is easy to spot which items haven't gone through QC.
29-
30-
See [HELP.md](https://github.com/jasminsehic/PullRequestReleaseNotes/blob/master/docs/HELP.md) for all the details on how perform these customisations.
31-
32-
## .NET Core Global Tool Install
33-
34-
dotnet tool install -g PullRequestReleaseNotes.DotNetCore
35-
36-
## .NET Core Global Tool Usage
21+
## Docker Image
3722

38-
While inside a git working directory run the application
23+
You can run `jasminsehic/pullrequestreleasenotes` Linux Docker image on Windows WSL2, Linux or MacOS.
24+
While inside the root of a working git directory run the Docker image using below command examples.
25+
GitHubToken used in the example is just an example.
3926

40-
$ dotnet-pullrequestreleasenotes -GitHubToken c03b77a4982d48f0af328312a9b99455
27+
To run on Windows run this from Command Prompt:
28+
```
29+
docker run --rm -it -v "%cd%:/repo" jasminsehic/pullrequestreleasenotes:latest -grp /repo -GitHubToken c03b77a4982d48f0af328312a9b99455
30+
```
31+
or run this from PowerShell:
32+
```
33+
docker run --rm -it -v "${pwd}:/repo" jasminsehic/pullrequestreleasenotes:latest -grp /repo -GitHubToken c03b77a4982d48f0af328312a9b99455
34+
```
35+
To run on Linux or MacOS:
36+
```
37+
docker run --rm -it -v "$(pwd):/repo" jasminsehic/pullrequestreleasenotes:latest -grp /repo -GitHubToken c03b77a4982d48f0af328312a9b99455
38+
```
4139

42-
### Linux note
40+
## Release Notes Format
4341

44-
Only tested on Ubuntu 18.04 (Bionic) and 20.04 (Focal Fossa). You will need to run `sudo apt-get install libgit2-dev` and `sudo ln -s /usr/lib/x86_64-linux-gnu/libgit2.so /usr/lib/x86_64-linux-gnu/libgit2-572e4d8.so` to ensure libgit2 library can be found by the app. This is expected to be resolved in a future version of LibGit2Sharp.
42+
Utility outputs release notes following the [Semantic Release Notes](https://web.archive.org/web/20161013175123/http://www.semanticreleasenotes.org/) format hiararchy and extracts semantic release note sections, categories and summaries from the pull request title and labels.
4543

46-
## Chocolatey Install
44+
For example all pull requests with `Bug` label can be grouped under `Fixes` section and pull requests with `Enhancement` label can be grouped under `Enhancements` section. Category grouping is possible through use of the `#Label` where `#` character is used to denote a category label as opposed to a section label. BitBucket Cloud / Server pull request providers do not have a label concept yet so for those providers you can type `[#section]` and `[##category]` either in the title or the description of the pull request as a pseudo-label.
4745

48-
choco install PullRequestReleaseNotes
49-
50-
## Chocolatey Usage
46+
Release note formatting can be further customised where you can turn off grouping by section and category, order the release notes based on merged or created time of pull request and the format of the release note itself. Version number can be supplied via [GitVersion](https://github.com/GitTools/GitVersion) tool.
5147

52-
While inside a git working directory run the application
48+
You can also define a label to exclude pull request from release notes. Also you can define a label that when not added to a pull request will add a release note highlighted as code. This can be useful for scenarios such as QA team adding a QC label to a pull request so then it is easy to spot which items haven't gone through QC.
5349

54-
$ PullRequestReleaseNotes -GitHubToken c03b77a4982d48f0af328312a9b99455
50+
See [HELP.md](https://github.com/jasminsehic/PullRequestReleaseNotes/blob/master/docs/HELP.md) for all the details on how perform these customisations.
5551

5652
## PullRequestReleaseNotes in action
5753

appveyor.yml

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

docs/HELP.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
### Command Line Parameters
22
Utility can have command line parameters passed to it or have the parameters supplied via a YAML based config or a mixture of both. Command line parameter will win if the same parameter is also supplied via YAML. You can generate a sample YAML file by passing -init parameter to the utility.
33

4+
You can use `--version` as a command line parameter to print the version of the PullRequestReleaseNotes application.
5+
46
- `-PullRequestProviderName` (`-prpn`) : Default is `github`. Other providers supported are `gitlab`, `tfs`, `bitbucket` and `bitbucketserver`.
57
- `-GitHubToken` (`-ghpt`) : Required parameter if PullRequestProviderName is `github`. Can be supplied as parameter or `PRRN_GITHUB_TOKEN` environment variable.
68
- `-GitHubOwner` (`-gho`) : Default is extracted from remote url.

src/PullRequestReleaseNotes.Tests/PullRequestReleaseNotes.Tests.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
4+
<TargetFramework>net6.0</TargetFramework>
55
<IsPublishable>false</IsPublishable>
66
<IsPackable>false</IsPackable>
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
11-
<PackageReference Include="NUnit" Version="3.12.0" />
12-
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
13-
<PackageReference Include="Shouldly" Version="3.0.2" />
10+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
11+
<PackageReference Include="NUnit" Version="3.13.3" />
12+
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
13+
<PackageReference Include="Shouldly" Version="4.0.3" />
1414
<PackageReference Include="TestStack.BDDfy" Version="4.3.2" />
1515
</ItemGroup>
1616

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# directories
2+
**/bin/
3+
**/obj/
4+
**/out/
5+
6+
# files
7+
Dockerfile*
8+
**/*.trx
9+
**/*.md
10+
**/*.ps1
11+
**/*.cmd
12+
**/*.sh

0 commit comments

Comments
 (0)