Skip to content

Commit 745d75d

Browse files
authored
Merge pull request #234 from duckduckgo/muodov/release-automation
Release automation
2 parents dd255a4 + db3c11e commit 745d75d

File tree

6 files changed

+3347
-493
lines changed

6 files changed

+3347
-493
lines changed

.autorc

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"plugins": [],
3+
"onlyPublishWithReleaseLabel": true,
4+
"noDefaultLabels": true,
5+
"labels": [
6+
{
7+
"name": "data-update",
8+
"changelogTitle": "🚧 dataset update",
9+
"description": "Change in categorization or entity data",
10+
"releaseType": "minor",
11+
"color": "#F1A60E"
12+
},
13+
{
14+
"name": "crawl-update",
15+
"changelogTitle": "🔁 Regular crawl update",
16+
"description": "Regular dataset update",
17+
"releaseType": "patch",
18+
"color": "#870048"
19+
},
20+
{
21+
"name": "skip-release",
22+
"description": "Preserve the current version when merged",
23+
"releaseType": "skip",
24+
"color": "#bf5416"
25+
},
26+
{
27+
"name": "release",
28+
"description": "Create a release when this pr is merged",
29+
"releaseType": "release",
30+
"color": "#007f70"
31+
}
32+
]
33+
}

.github/workflows/node.js.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
strategy:
1717
matrix:
18-
node-version: [10.x, 14.x]
18+
node-version: [16.x, 18.x]
1919

2020
steps:
2121
- uses: actions/checkout@v2

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- name: Prepare repository
16+
run: git fetch --unshallow --tags
17+
18+
- name: Use Node.js 18.x
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: 18.x
22+
23+
- name: Create Release
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
run: |
27+
npm ci
28+
if npx auto label --exists release;
29+
then
30+
npx auto release --no-version-prefix --use-version `date +%Y.%m.%d`
31+
fi

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.env
2+
node_modules/
3+

0 commit comments

Comments
 (0)