Skip to content

Commit 8b3c048

Browse files
authored
chore: automated versioning and release
* chore: only do ci on pull requests. * chore: bump and tag version on merge to main * fix: revert to default wording Use default wording of bump version GitHub action which conforms to conventional commits. * add: dependabot commit message prefix * chore: added dependbot batcher * chore: renamed action to describe action * chore: create release on "v" tags
1 parent b780152 commit 8b3c048

5 files changed

Lines changed: 103 additions & 19 deletions

File tree

.github/dependabot.yml

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
11
version: 2
22
updates:
3-
- package-ecosystem: npm
4-
directory: "/"
5-
schedule:
6-
interval: monthly
7-
time: "17:00"
8-
timezone: America/New_York
9-
open-pull-requests-limit: 10
10-
reviewers:
11-
- davidlday
12-
- package-ecosystem: "github-actions"
13-
directory: "/"
14-
schedule:
15-
interval: monthly
16-
time: "17:00"
17-
timezone: America/New_York
18-
open-pull-requests-limit: 10
19-
reviewers:
20-
- davidlday
3+
- package-ecosystem: npm
4+
directory: "/"
5+
schedule:
6+
interval: monthly
7+
time: "17:00"
8+
timezone: America/New_York
9+
open-pull-requests-limit: 10
10+
commit-message:
11+
prefix: "chore"
12+
include: scope
13+
reviewers:
14+
- davidlday
15+
- package-ecosystem: "github-actions"
16+
directory: "/"
17+
schedule:
18+
interval: monthly
19+
time: "17:00"
20+
timezone: America/New_York
21+
commit-message:
22+
prefix: "chore"
23+
include: scope
24+
open-pull-requests-limit: 10
25+
reviewers:
26+
- davidlday
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Bump Main on Merge
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- "main"
8+
9+
jobs:
10+
version-bump:
11+
name: "Bump Version on main"
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: "Checkout source code"
15+
uses: "actions/checkout@v3"
16+
with:
17+
ref: ${{ github.ref }}
18+
- name: "cat package.json"
19+
run: cat ./package.json
20+
- name: "Automated Version Bump"
21+
id: version-bump
22+
uses: "phips28/gh-action-bump-version@9.0.42"
23+
with:
24+
tag-prefix: "v"
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
- name: "cat package.json"
28+
run: cat ./package.json
29+
- name: "Output Step"
30+
env:
31+
NEW_TAG: ${{ steps.version-bump.outputs.newTag }}
32+
run: echo "new tag $NEW_TAG"
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Create Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
create-release:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
16+
- name: Create changelog text
17+
id: changelog
18+
uses: loopwerk/tag-changelog@v1
19+
with:
20+
token: ${{ secrets.GITHUB_TOKEN }}
21+
exclude_types: other,doc,chore
22+
23+
- name: Create release
24+
uses: actions/create-release@latest
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
with:
28+
tag_name: ${{ github.ref }}
29+
release_name: Release ${{ github.ref }}
30+
body: ${{ steps.changelog.outputs.changes }}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: "Dependabot Batcher: Scheduled"
2+
on:
3+
schedule:
4+
- cron: "0 9 * * 0,3"
5+
6+
jobs:
7+
# Batches Dependabot PRs into one by merging them into a combined branch, then raising a new PR
8+
dependabot-batcher:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: "Combine Dependabot PRs"
12+
uses: "Legal-and-General/dependabot-batcher@1.04"
13+
with:
14+
token: ${{ secrets.YOUR_TOKEN }}
15+
baseBranchName: "main"
16+
batchPullTitle: "chore(deps): dependabot batcher updates"

.github/workflows/nodejs-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
name: Node.js CI
55

6-
on: [push, pull_request]
6+
on: pull_request
77

88
jobs:
99
build:

0 commit comments

Comments
 (0)