Skip to content

Commit a5ab255

Browse files
committed
Add Github workflows
1 parent 25ce9ca commit a5ab255

File tree

4 files changed

+110
-1
lines changed

4 files changed

+110
-1
lines changed

.github/changelog-configuration.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"pr_template": "- ${{TITLE}} (#${{NUMBER}})",
3+
"categories": [
4+
{
5+
"title": "## 🚀 Features",
6+
"labels": ["enhancement"]
7+
},
8+
{
9+
"title": "## 🛠️ Minor Changes",
10+
"labels": ["change"]
11+
},
12+
{
13+
"title": "## 🔎 Breaking Changes",
14+
"labels": ["breaking"]
15+
},
16+
{
17+
"title": "## 🐛 Fixes",
18+
"labels": ["bug"]
19+
},
20+
{
21+
"title": "## 📄 Documentation",
22+
"labels": ["documentation"]
23+
},
24+
{
25+
"title": "## 🔗 Dependency Updates",
26+
"labels": ["dependency"]
27+
}
28+
],
29+
"template": "${{CATEGORIZED_COUNT}} changes since ${{FROM_TAG}}\n\n${{CHANGELOG}}"
30+
}

.github/workflows/build.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Test
2+
3+
on:
4+
pull_request: {}
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
12+
- name: Docker meta
13+
id: meta
14+
uses: docker/metadata-action@v3
15+
with:
16+
images: ghcr.io/${{ github.repository }}
17+
18+
- name: Build image
19+
uses: docker/build-push-action@v2
20+
with:
21+
tags: ${{ steps.meta.outputs.tags }}
22+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/release.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
env:
9+
REGISTRY_URL: ghcr.io
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Docker meta
20+
id: meta
21+
uses: docker/metadata-action@v3
22+
with:
23+
images: ${{ env.REGISTRY_URL }}/${{ github.repository }}
24+
25+
- name: Docker login
26+
uses: docker/login-action@v1
27+
with:
28+
registry: ${{ env.REGISTRY_URL }}
29+
username: ${{ github.repository_owner }}
30+
password: ${{ github.token }}
31+
32+
- name: Build image
33+
uses: docker/build-push-action@v2
34+
with:
35+
push: true
36+
tags: ${{ steps.meta.outputs.tags }}
37+
labels: ${{ steps.meta.outputs.labels }}
38+
39+
- name: Build changelog from PRs with labels
40+
id: build_changelog
41+
uses: mikepenz/release-changelog-builder-action@v2
42+
with:
43+
configuration: ".github/changelog-configuration.json"
44+
# PreReleases still get a changelog, but the next full release gets a diff since the last full release,
45+
# combining possible changelogs of all previous PreReleases in between.
46+
# PreReleases show a partial changelog since last PreRelease.
47+
ignorePreReleases: "${{ !contains(github.ref, '-rc') }}"
48+
env:
49+
GITHUB_TOKEN: ${{ github.token }}
50+
51+
- name: Create Release
52+
uses: ncipollo/release-action@v1
53+
with:
54+
body: ${{steps.build_changelog.outputs.changelog}}
55+
prerelease: "${{ contains(github.ref, '-rc') }}"
56+
# Ensure target branch for release is "master"
57+
commit: master
58+
token: ${{ github.token }}

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ lib-cov
66
*.out
77
*.pid
88
*.gz
9-
.*
109
*.sqlite
1110
pids
1211
logs

0 commit comments

Comments
 (0)