Skip to content

Commit 20c464c

Browse files
committed
feat: initial commit
0 parents  commit 20c464c

29 files changed

+14775
-0
lines changed

.eslintignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
build/
2+
coverage/
3+
dist/
4+
node_modules/

.eslintrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "./node_modules/gts/"
3+
}

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @jef

.github/FUNDING.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: jef
2+
custom: ["https://www.paypal.me/jxf"]

.github/ISSUE_TEMPLATE/bug-report.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: "\U0001F41B Bug report"
3+
about: Report a bug for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
## Expected Behavior
11+
12+
<!-- Tell us what should happen -->
13+
14+
## Current Behavior
15+
16+
<!-- Tell us what happens instead of the expected behavior -->
17+
18+
## Steps to Reproduce
19+
20+
<!-- Provide a link to a live example, or an unambiguous set of steps to reproduce this bug. -->
21+
<!-- Include code to reproduce, if relevant -->
22+
23+
## Logs
24+
25+
<!-- Provide a brief log -->

.github/ISSUE_TEMPLATE/config.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: 💡 Have an idea for a new feature?
4+
url: https://github.com/jef/conventional-commits-release-action/discussions
5+
about: Create a new idea discussion!
6+
- name: 🙇 Need help?
7+
url: https://github.com/jef/conventional-commits-release-action/discussions
8+
about: Create a new help discussion if it hasn't been asked before!

.github/dependabot.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
- package-ecosystem: "npm"
8+
directory: "/"
9+
schedule:
10+
interval: "daily"

.github/pull_request_template.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!-- Please use Conventional Commits to label your title -->
2+
<!-- https://www.conventionalcommits.org/en/v1.0.0/ -->
3+
<!-- Example: feat: allow provided config object to extend other configs -->
4+
5+
### Description
6+
7+
<!-- Fixes #(issue) -->
8+
<!-- Please also include relevant motivation and context. -->
9+
10+
### Testing
11+
12+
<!-- Please describe the tests that you ran to verify your changes. -->
13+
<!-- Provide instructions so we can reproduce. -->
14+
<!-- Please also list any relevant details for your test configuration -->
15+
16+
### New dependencies
17+
18+
<!-- List any dependencies that are required for this change. -->
19+
<!-- Otherwise, delete section. -->

.github/workflows/ci.yaml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Continuous Integration
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
push:
7+
branches:
8+
- main
9+
jobs:
10+
build-lint:
11+
name: Build and lint
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v2
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v2
18+
with:
19+
node-version: 12.20.1
20+
- name: Setup build cache
21+
uses: actions/cache@v2
22+
with:
23+
path: '**/node_modules'
24+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
25+
restore-keys: ${{ runner.os }}-node-
26+
- name: Install dependencies
27+
run: npm ci
28+
- name: Compile TypeScript
29+
run: npm run compile
30+
- name: Run linter
31+
run: npm run lint

.github/workflows/pr-lint.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Pull Request Linter
2+
on:
3+
pull_request:
4+
types:
5+
- opened
6+
- edited
7+
- reopened
8+
jobs:
9+
lint-pr:
10+
name: Lint pull request title
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v2
15+
- name: Lint pull request title
16+
uses: jef/conventional-commits-pr-action@v1
17+
with:
18+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yaml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
build-tag-release:
8+
name: Build, tag, and release
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v2
13+
- name: Setup release please
14+
uses: google-github-actions/release-please-action@v2
15+
id: release
16+
with:
17+
token: ${{ secrets.GITHUB_TOKEN }}
18+
release-type: node
19+
changelog-path: CHANGELOG.md
20+
package-name: conventional-commits-release-action
21+
- name: Tag major version
22+
if: ${{ steps.release.outputs.release_created }}
23+
run: |
24+
git config user.name github-actions[bot]
25+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
26+
git remote add gh-token "https://${{ secrets.GITHUB_TOKEN}}@github.com/google-github-actions/release-please-action.git"
27+
git tag -d v${{ steps.release.outputs.major }} || true
28+
git push origin :v${{ steps.release.outputs.major }} || true
29+
git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}"
30+
git push origin v${{ steps.release.outputs.major }}

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.idea/
2+
.vscode/
3+
4+
build/
5+
coverage/
6+
node_modules/

.node-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
12.20.1

.prettierrc.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
...require('gts/.prettierrc.json')
3+
}

CHANGELOG.md

Whitespace-only changes.

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Jef LeCompte
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

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# conventional-commits-release-action
2+
3+
Creates releases based on [Conventional Commits v1.0.0](https://www.conventionalcommits.org/en/v1.0.0/).
4+
5+
## Usage
6+
7+
```yaml
8+
name: Release
9+
on:
10+
push:
11+
branches:
12+
- main
13+
jobs:
14+
release:
15+
name: Release code
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v2
20+
with:
21+
fetch-depth: 0
22+
- name: Release
23+
uses: jef/conventional-commits-release-action@v1
24+
with:
25+
token: ${{ secrets.GITHUB_TOKEN }}
26+
```
27+
28+
## Inputs
29+
30+
- `create-major`: Creates a major tag as well as Semantic Version. Default is `false`.
31+
- `token` [**Required**]: Access token to the repository. Usually `${{ secrets.GITHUB_TOKEN }}`.
32+
33+
## Outputs
34+
35+
- `tag`: The tag that was created.
36+
37+
## Contributing
38+
39+
There are few npm tasks that will help you in building and packaging. All commands are prefaced by `npm run`.
40+
41+
- `build`: builds the action.
42+
- `compile`: transpiles TypeScript.
43+
- `clean`: removes `build` directory.
44+
- `fix`: fixes lint and format issues.
45+
- `lint`: runs linter and checks format issues.
46+
- `start`: runs the action.
47+
- `test`: tests the action.

action.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Conventional Commits Release
2+
description: Creates releases based on Conventional Commits
3+
branding:
4+
icon: align-left
5+
color: blue
6+
inputs:
7+
create-major:
8+
required: false
9+
description: Creates a major tag as well as Semantic Version.
10+
default: 'false'
11+
token:
12+
required: true
13+
description: Access token to the repository.
14+
runs:
15+
using: node12
16+
main: dist/index.js

0 commit comments

Comments
 (0)