Skip to content
This repository was archived by the owner on Sep 26, 2024. It is now read-only.

Commit a35d3be

Browse files
author
Zack Stevens
committed
Initial commit
0 parents  commit a35d3be

File tree

9 files changed

+10311
-0
lines changed

9 files changed

+10311
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Validate pull request
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
jobs:
7+
validate-pr-title:
8+
name: Validate PR Title
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: crazy-max/ghaction-dump-context@v1
12+
- uses: amannn/[email protected]
13+
with:
14+
types: |
15+
fix
16+
feat
17+
norelease
18+
validateSingleCommit: true
19+
env:
20+
GITHUB_TOKEN: ${{ github.token }}

.github/workflows/release.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Release
2+
on:
3+
pull_request:
4+
types:
5+
- closed
6+
branches:
7+
- main
8+
paths:
9+
- index.js
10+
- package.json
11+
- package-lock.json
12+
jobs:
13+
release:
14+
if: github.event.pull_request.merged == true
15+
runs-on: ubuntu-latest
16+
env:
17+
NPM_TOKEN:
18+
${{ secrets.AUTOMATION_NPMJS_TOKEN }}
19+
steps:
20+
- uses: crazy-max/ghaction-dump-context@v1
21+
- name: Checkout
22+
uses: actions/checkout@v2
23+
with:
24+
# this makes the semantic-release git plugin push as the automation user, which allows us to bypass branch protection
25+
token: ${{ secrets.DEPLOYER_CI_TOKEN }}
26+
- id: semantic-release
27+
uses: cycjimmy/semantic-release-action@v2
28+
with:
29+
extra_plugins: |
30+
conventional-changelog-conventionalcommits
31+
@semantic-release/changelog
32+
@semantic-release/git
33+
env:
34+
# github.token can't trigger workflows, we want the created release to trigger other workflows, so use the token
35+
GITHUB_TOKEN: ${{ secrets.DEPLOYER_CI_TOKEN }}

.gitignore

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
*.lcov
24+
25+
# nyc test coverage
26+
.nyc_output
27+
28+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29+
.grunt
30+
31+
# Bower dependency directory (https://bower.io/)
32+
bower_components
33+
34+
# node-waf configuration
35+
.lock-wscript
36+
37+
# Compiled binary addons (https://nodejs.org/api/addons.html)
38+
build/Release
39+
40+
# Dependency directories
41+
node_modules/
42+
jspm_packages/
43+
44+
# TypeScript v1 declaration files
45+
typings/
46+
47+
# TypeScript cache
48+
*.tsbuildinfo
49+
50+
# Optional npm cache directory
51+
.npm
52+
53+
# Optional eslint cache
54+
.eslintcache
55+
56+
# Microbundle cache
57+
.rpt2_cache/
58+
.rts2_cache_cjs/
59+
.rts2_cache_es/
60+
.rts2_cache_umd/
61+
62+
# Optional REPL history
63+
.node_repl_history
64+
65+
# Output of 'npm pack'
66+
*.tgz
67+
68+
# Yarn Integrity file
69+
.yarn-integrity
70+
71+
# dotenv environment variables file
72+
.env
73+
.env.test
74+
75+
# parcel-bundler cache (https://parceljs.org/)
76+
.cache
77+
78+
# Next.js build output
79+
.next
80+
81+
# Nuxt.js build / generate output
82+
.nuxt
83+
dist
84+
85+
# Gatsby files
86+
.cache/
87+
# Comment in the public line in if your project uses Gatsby and *not* Next.js
88+
# https://nextjs.org/blog/next-9-1#public-directory-support
89+
# public
90+
91+
# vuepress build output
92+
.vuepress/dist
93+
94+
# Serverless directories
95+
.serverless/
96+
97+
# FuseBox cache
98+
.fusebox/
99+
100+
# DynamoDB Local files
101+
.dynamodb/
102+
103+
# TernJS port file
104+
.tern-port

.releaserc.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"branches": [
3+
"main"
4+
],
5+
"ci": false,
6+
"plugins": [
7+
["@semantic-release/commit-analyzer", {
8+
"preset": "conventionalcommits",
9+
"releaseRules": [
10+
{"scope": "norelease", "release": false}
11+
]
12+
}],
13+
"@semantic-release/release-notes-generator",
14+
"@semantic-release/changelog",
15+
"@semantic-release/npm",
16+
["@semantic-release/git", {
17+
"message": "semantic-release-bot chore(release): ${nextRelease.version} \n\n${nextRelease.notes}"
18+
}],
19+
"@semantic-release/github"
20+
]
21+
}

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# 1.0.0 (2021-12-20)
2+
3+
4+
### Bug Fixes
5+
6+
* Initial release ([#1](https://github.com/Unsupervisedcom/release-config-template/issues/1)) ([540d5cc](https://github.com/Unsupervisedcom/release-config-template/commit/540d5cc29eb46a36720a7a0c9c11795fc3463fca))

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# release-config-template
2+
semantic-release release configuration template repository
3+
4+
# How do I use it?
5+
1. modify `index.js` to export whatever release config you want, this is the shareable config that other releases will use.
6+
2. Replace all instances of `release-config-template` with the name of your release config. It should follow the convention `release-config-{your name here}`
7+
3. PR to main following conventional commits. Make sure your squash message follows conventional commits.
8+
4. The release workflow should run, and publish your shareable config to npm so you can use it in releases via extends as `@unsupervised/release-config-{your name here}`

index.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
module.exports = {
2+
"branches": [
3+
"main"
4+
],
5+
"ci": false,
6+
"plugins": [
7+
["@semantic-release/exec", {
8+
"prepareCmd": "echo \"success\""
9+
}],
10+
["@semantic-release/commit-analyzer", {
11+
"preset": "conventionalcommits",
12+
"releaseRules": [
13+
{"scope": "norelease", "release": false}
14+
]
15+
}],
16+
"@semantic-release/release-notes-generator",
17+
"@semantic-release/changelog",
18+
["@semantic-release/git", {
19+
"assets": ["CHANGELOG.md"],
20+
"message": "semantic-release-bot chore(release): ${nextRelease.version} \n\n${nextRelease.notes}"
21+
}],
22+
"@semantic-release/github"
23+
]
24+
}

0 commit comments

Comments
 (0)