Skip to content

Commit 30f5e07

Browse files
jenniferboedkerSteffengreinerKochTobi
authored
Maintain repository (#287)
Cleaning up workflows, adding new ones, and maintaining the repository documentation Co-authored-by: Steffengreiner <Steffen.Greiner@gmx.de> Co-authored-by: Tobias Koch <KochTobi@users.noreply.github.com>
1 parent 0f78f15 commit 30f5e07

29 files changed

+183
-745
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @qbicsoftware/itss

.github/pr-labels.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
feature: ['feature/*', 'feat/*']
2+
fix: ['fix/*', 'hotfix']
3+
chore: ['chore/*', 'documentation/*', 'docs/*', 'ci/*', 'refactor/*']

.github/release.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- ignore-for-release
5+
authors:
6+
- JohnnyQ5
7+
- github-actions
8+
categories:
9+
- title: New Features 🚀
10+
labels:
11+
- feature
12+
- title: Bugfixes 🪲
13+
labels:
14+
- fix
15+
- title: Documentation & CI 🪂
16+
labels:
17+
- chore
18+
- title: Others 🧃
19+
labels:
20+
- "*"

.github/workflows/build_package.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ jobs:
1212
uses: actions/setup-java@v1
1313
with:
1414
java-version: 1.8
15+
- name: Load local Maven repository cache
16+
uses: actions/cache@v2
17+
with:
18+
path: ~/.m2/repository
19+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
20+
restore-keys: |
21+
${{ runner.os }}-maven-
1522
1623
- name: Run mvn package
1724
run: mvn -B package --file pom.xml

.github/workflows/changelog-update.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Create Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
versionTag:
7+
description: 'Version Tag (semantic version)'
8+
required: true
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up JDK 1.8
16+
uses: actions/setup-java@v1
17+
with:
18+
java-version: 1.8
19+
settings-path: ${{ github.workspace }}
20+
21+
- name: Load local Maven repository cache
22+
uses: actions/cache@v2
23+
with:
24+
path: ~/.m2/repository
25+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
26+
restore-keys: |
27+
${{ runner.os }}-maven-
28+
- name: Set up git
29+
run: |
30+
git config --global user.email "support@qbic.zendesk.com"
31+
git config --global user.name "JohnnyQ5"
32+
- name: Set version in Maven project
33+
run: mvn versions:set -DnewVersion=${{ github.event.inputs.versionTag }}
34+
35+
- name: Build with Maven
36+
run: mvn -B package --file pom.xml
37+
38+
- name: Create Release Notes
39+
if: ${{ !startsWith(github.ref, 'refs/tags/')
40+
&& !( contains(github.event.inputs.versionTag, 'alpha')
41+
|| contains(github.event.inputs.versionTag, 'beta')
42+
|| contains(github.event.inputs.versionTag, 'rc')) }}
43+
uses: actions/github-script@v4.0.2
44+
with:
45+
github-token: ${{secrets.GITHUB_TOKEN}}
46+
script: |
47+
await github.request(`POST /repos/${{ github.repository }}/releases`, {
48+
tag_name: "${{ github.event.inputs.versionTag }}",
49+
generate_release_notes: true
50+
});
51+
- name: Create Pre-Release Notes
52+
if: ${{ !startsWith(github.ref, 'refs/tags/')
53+
&& ( contains(github.event.inputs.versionTag, 'alpha')
54+
|| contains(github.event.inputs.versionTag, 'beta')
55+
|| contains(github.event.inputs.versionTag, 'rc')) }}
56+
uses: actions/github-script@v4.0.2
57+
with:
58+
github-token: ${{secrets.GITHUB_TOKEN}}
59+
script: |
60+
await github.request(`POST /repos/${{ github.repository }}/releases`, {
61+
tag_name: "${{ github.event.inputs.versionTag }}",
62+
generate_release_notes: true,
63+
prerelease: true
64+
});
65+
- name: Publish artefact to QBiC Nexus Repository
66+
run: mvn --quiet --settings $GITHUB_WORKSPACE/.github.settings.xml deploy
67+
env:
68+
MAVEN_REPO_USERNAME: ${{ secrets.NEXUS_USERNAME }}
69+
MAVEN_REPO_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
70+
71+
- name: Switch to new branch
72+
run: git checkout -b release/set-version-to-${{ github.event.inputs.versionTag }}
73+
74+
- name: Checkin commit
75+
run: git commit . -m 'Set version to ${{ github.event.inputs.versionTag }}'
76+
77+
- name: Set remote branch
78+
run: git push --set-upstream origin release/set-version-to-${{ github.event.inputs.versionTag }}
79+
80+
- name: Open PR with version bump
81+
uses: actions/github-script@v4.0.2
82+
with:
83+
github-token: ${{secrets.GITHUB_TOKEN}}
84+
script: |
85+
await github.request(`POST /repos/${{ github.repository }}/pulls`, {
86+
title: 'Update version to ${{ github.event.inputs.versionTag }}',
87+
head: 'release/set-version-to-${{ github.event.inputs.versionTag }}',
88+
base: 'main'
89+
});

.github/workflows/dependabot.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/generate-reports.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Label Pull Requests
2+
3+
on:
4+
pull_request:
5+
types: [ opened, edited ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: TimonVS/pr-labeler-action@v3
12+
with:
13+
configuration-path: .github/pr-labels.yml # optional, .github/pr-labeler.yml is the default value
14+
env:
15+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/nexus-publish-release.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)