Skip to content

Commit aa8777b

Browse files
committed
initial import
1 parent a88e581 commit aa8777b

File tree

6 files changed

+96
-68
lines changed

6 files changed

+96
-68
lines changed

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# the repo. Unless a later match takes precedence,
66
# @global-owner1 and @global-owner2 will be requested for
77
# review when someone opens a pull request.
8-
# * @global-owner1 @global-owner2
8+
* @ssoerensen
99

1010
# Order is important; the last matching pattern takes the most
1111
# precedence. When someone opens a pull request that only

Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM docker.io/alpine:latest
2+
3+
COPY entrypoint.sh /entrypoint.sh
4+
RUN apk add --no-cache git && \
5+
wget -O /usr/local/bin/git-chglog \
6+
https://github.com/git-chglog/git-chglog/releases/download/0.9.1/git-chglog_linux_amd64 && \
7+
chmod 755 /entrypoint.sh /usr/local/bin/git-chglog
8+
9+
ENTRYPOINT [ "/entrypoint.sh" ]

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Nuuday
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 33 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,53 @@
1-
# Project Title
1+
# Generate changelog with git-chglog
22

3-
One Paragraph of project description goes here
3+
Github Action for creating a CHANGELOG.md file based on semver and conventional commits.
44

5-
## Getting Started
5+
## Usage
6+
### Pre-requisites
7+
Create a workflow .yml file in your repositories .github/workflows directory. An example workflow is available below. For more information, reference the GitHub Help Documentation for Creating a workflow file.
68

7-
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
9+
Further more you need to have [git-chlog]() configured and have the configuration added to your git repository
810

9-
### Prerequisites
11+
### Inputs
12+
- `next_version`: Next version number
13+
- `config_dir`: git-chglog configuration directory. Default: `.ghglog`
14+
- `filename`: Filename to write the changelog to. Default: `CHANGELOG.md`
1015

11-
What things you need to install the software and how to install them
16+
### Example workflow - upload a release asset
17+
On every `push` to `master` generate a CHANGELOG.md file.
1218

13-
```
14-
Give examples
15-
```
16-
17-
### Installing
18-
19-
A step by step series of examples that tell you how to get a development env running
20-
21-
Say what the step will be
22-
23-
```
24-
Give the example
25-
```
26-
27-
And repeat
28-
29-
```
30-
until finished
31-
```
32-
33-
End with an example of getting some data out of the system or using it for a little demo
34-
35-
## Running the tests
36-
37-
Explain how to run the automated tests for this system
38-
39-
### Break down into end to end tests
40-
41-
Explain what these tests test and why
42-
43-
```
44-
Give an example
45-
```
46-
47-
### And coding style tests
48-
49-
Explain what these tests test and why
19+
```yaml
20+
name: Build and release
21+
on:
22+
push:
23+
branches:
24+
- master
25+
pull_request:
26+
branches:
27+
- master
5028

29+
jobs:
30+
package:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: nuuday/[email protected]
34+
with:
35+
next_version: "1.0.0"
5136
```
52-
Give an example
53-
```
54-
55-
## Deployment
5637
57-
Add additional notes about how to deploy this on a live system
58-
59-
## Built With
60-
61-
* [Dropwizard](http://www.dropwizard.io/1.0.2/docs/) - The web framework used
62-
* [Maven](https://maven.apache.org/) - Dependency Management
63-
* [ROME](https://rometools.github.io/rome/) - Used to generate RSS Feeds
38+
## License
39+
The scripts and documentation in this project are released under the [MIT License](LICENSE)
6440
6541
## Contributing
6642
6743
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
6844
6945
## Versioning
7046
71-
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/nuuday/project/tags).
47+
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/nuuday/github-changelog-action/tags).
7248
7349
## Authors
7450
75-
* **Billie Thompson** - *Initial work* - [PurpleBooth](https://github.com/PurpleBooth)
76-
77-
See also the list of [contributors](https://github.com/nuuday/project/contributors) who participated in this project.
78-
79-
## License
80-
81-
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
82-
83-
## Acknowledgments
51+
* **Steffen F. Qvistgaard** - *Initial work* - [PurpleBooth](https://github.com/ssoerensen)
8452
85-
* Hat tip to anyone whose code was used
86-
* Inspiration
87-
* etc
53+
See also the list of [contributors](https://github.com/nuuday/github-changelog-action/contributors) who participated in this project.

action.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: 'Generate changelog with git-chglog'
2+
description: 'Greet someone and record the time'
3+
inputs:
4+
next_version:
5+
description: 'Next version'
6+
required: true
7+
8+
config_dir:
9+
description: 'git-chglog configuration directory'
10+
default: '.chglog'
11+
required: true
12+
13+
filename:
14+
description: 'Filename to write the changelog to'
15+
default: 'CHANGELOG.md'
16+
required: true
17+
18+
runs:
19+
using: 'docker'
20+
image: 'Dockerfile'
21+
args:
22+
- ${{ inputs.config_dir }}
23+
- ${{ inputs.next_version }}
24+
- ${{ inputs.filename }}

entrypoint.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
cd /github/workspace/
3+
4+
if [ -f "${1}/config.yml" ] && [ -f "${1}/CHANGELOG.tpl.md" ]; then
5+
/usr/local/bin/git-chglog --next-tag "${2}" --output "${3}" --config "${1}/config.yml"
6+
else
7+
echo "::warning ::git-chlog configuration was not found, skipping changelog generation."
8+
fi

0 commit comments

Comments
 (0)