Skip to content

Commit aad76e7

Browse files
Merge pull request #18 from qbicsoftware/development
First release
2 parents b6bde6b + 410ea76 commit aad76e7

File tree

73 files changed

+7234
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+7234
-1
lines changed

.github.settings.xml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<settings>
2+
<servers>
3+
<server>
4+
<id>nexus-snapshots</id>
5+
<username>${env.MAVEN_REPO_USERNAME}</username>
6+
<password>${env.MAVEN_REPO_PASSWORD}</password>
7+
</server>
8+
<server>
9+
<id>nexus-releases</id>
10+
<username>${env.MAVEN_REPO_USERNAME}</username>
11+
<password>${env.MAVEN_REPO_PASSWORD}</password>
12+
</server>
13+
</servers>
14+
</settings>

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @qbicsoftware/itss

.github/pr-labels.yml

+3
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

+20
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

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build Maven Package
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
pull_request:
8+
# The branches below must be a subset of the branches above
9+
branches: [ main, master ]
10+
11+
jobs:
12+
package:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up JDK 11
18+
uses: actions/setup-java@v1
19+
with:
20+
java-version: 11
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: Run mvn package
29+
run: mvn -B package --file pom.xml

.github/workflows/codeql-analysis.yml

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ main, master, development, release/*, hotfix/* ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ main, master ]
20+
schedule:
21+
- cron: '21 1 * * 4'
22+
23+
jobs:
24+
analyze:
25+
runs-on: ubuntu-latest
26+
permissions:
27+
actions: read
28+
contents: read
29+
security-events: write
30+
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
language: [ 'java' ]
35+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
36+
# Learn more about CodeQL language support at https://git.io/codeql-language-support
37+
38+
steps:
39+
- name: Checkout repository
40+
uses: actions/checkout@v4
41+
- name: Set up JDK 11
42+
uses: actions/setup-java@v4
43+
with:
44+
distribution: 'zulu'
45+
java-version: '11'
46+
settings-path: ${{ github.workspace }}
47+
48+
- name: Load local Maven repository cache
49+
uses: actions/cache@v4
50+
with:
51+
path: ~/.m2/repository
52+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
53+
restore-keys: |
54+
${{ runner.os }}-maven-
55+
56+
# Initializes the CodeQL tools for scanning.
57+
- name: Initialize CodeQL
58+
uses: github/codeql-action/init@v3
59+
with:
60+
languages: ${{ matrix.language }}
61+
# If you wish to specify custom queries, you can do so here or in a config file.
62+
# By default, queries listed here will override any specified in a config file.
63+
# Prefix the list here with "+" to use these queries and those in the config file.
64+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
65+
66+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
67+
# If this step fails, then you should remove it and run the build manually (see below)
68+
- name: Autobuild
69+
uses: github/codeql-action/autobuild@v3
70+
71+
# ℹ️ Command-line programs to run using the OS shell.
72+
# 📚 https://git.io/JvXDl
73+
74+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
75+
# and modify them (or add more) to build your code if your project
76+
# uses a compiled language
77+
78+
#- run: |
79+
# make bootstrap
80+
# make release
81+
82+
- name: Perform CodeQL Analysis
83+
uses: github/codeql-action/analyze@v3

.github/workflows/create-release.yml

+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
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+
release:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up JDK 11
16+
uses: actions/setup-java@v1
17+
with:
18+
java-version: 11
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+
29+
- name: Set up git
30+
run: |
31+
git config --global user.email "[email protected]"
32+
git config --global user.name "JohnnyQ5"
33+
34+
- name: Set version in Maven project
35+
run: mvn versions:set -DnewVersion=${{ github.event.inputs.versionTag }}
36+
37+
- name: Build with Maven
38+
run: mvn -B package --file pom.xml
39+
40+
- name: Create Release Notes
41+
if: ${{ !startsWith(github.ref, 'refs/tags/')
42+
&& !( contains(github.event.inputs.versionTag, 'alpha')
43+
|| contains(github.event.inputs.versionTag, 'beta')
44+
|| contains(github.event.inputs.versionTag, 'rc')) }}
45+
uses: actions/[email protected]
46+
with:
47+
github-token: ${{secrets.JOHNNY_Q5_REPORTS_TOKEN}}
48+
script: |
49+
await github.request(`POST /repos/${{ github.repository }}/releases`, {
50+
tag_name: "${{ github.event.inputs.versionTag }}",
51+
generate_release_notes: true
52+
});
53+
54+
- name: Create Pre-Release Notes
55+
if: ${{ !startsWith(github.ref, 'refs/tags/')
56+
&& ( contains(github.event.inputs.versionTag, 'alpha')
57+
|| contains(github.event.inputs.versionTag, 'beta')
58+
|| contains(github.event.inputs.versionTag, 'rc')) }}
59+
uses: actions/[email protected]
60+
with:
61+
github-token: ${{secrets.JOHNNY_Q5_REPORTS_TOKEN}}
62+
script: |
63+
await github.request(`POST /repos/${{ github.repository }}/releases`, {
64+
tag_name: "${{ github.event.inputs.versionTag }}",
65+
generate_release_notes: true,
66+
prerelease: true
67+
});
68+
69+
- name: Publish artefact to QBiC Nexus Repository
70+
run: mvn --quiet --settings $GITHUB_WORKSPACE/.github.settings.xml deploy
71+
env:
72+
MAVEN_REPO_USERNAME: ${{ secrets.NEXUS_USERNAME }}
73+
MAVEN_REPO_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
74+
75+
- name: Switch to new branch
76+
run: git checkout -b release/set-version-to-${{ github.event.inputs.versionTag }}
77+
78+
- name: Set remote branch
79+
run: git push --set-upstream origin release/set-version-to-${{ github.event.inputs.versionTag }}
80+
81+
- name: Checkin commit
82+
run: git commit . -m 'Set version to ${{ github.event.inputs.versionTag }}'
83+
84+
- name: Push to Github
85+
run: git push
86+
87+
- name: Open PR with version bump
88+
uses: actions/[email protected]
89+
with:
90+
github-token: ${{secrets.JOHNNY_Q5_REPORTS_TOKEN}}
91+
script: |
92+
await github.request(`POST /repos/${{ github.repository }}/pulls`, {
93+
title: 'Update version to ${{ github.event.inputs.versionTag }}',
94+
head: 'release/set-version-to-${{ github.event.inputs.versionTag }}',
95+
base: 'master'
96+
});
+15
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+
label:
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 }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# This workflow will build a package using Maven and then publish it to
2+
# qbic-repo.qbic.uni-tuebingen.de packages when a release is created
3+
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path
4+
5+
name: Deploy Snapshot
6+
7+
on:
8+
push:
9+
branches:
10+
- development
11+
12+
jobs:
13+
publish_snapshots:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Set up JDK 11
20+
uses: actions/setup-java@v1
21+
with:
22+
java-version: 11
23+
settings-path: ${{ github.workspace }}
24+
25+
- name: Load local Maven repository cache
26+
uses: actions/cache@v2
27+
with:
28+
path: ~/.m2/repository
29+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
30+
restore-keys: |
31+
${{ runner.os }}-maven-
32+
# Remove existing snapshot tags which are not supposed to be present
33+
- name: Remove snapshot tags
34+
run: mvn versions:set -DremoveSnapshot
35+
# Set the SNAPSHOT for this build and deployment
36+
- name: Set version in Maven project
37+
run: mvn versions:set -DnewVersion='${project.version}-SNAPSHOT'
38+
39+
- name: Build with Maven
40+
run: mvn -B package --file pom.xml
41+
42+
- name: Publish artefact to QBiC Nexus Repository
43+
run: mvn --settings $GITHUB_WORKSPACE/.github.settings.xml deploy
44+
env:
45+
MAVEN_REPO_USERNAME: ${{ secrets.NEXUS_USERNAME }}
46+
MAVEN_REPO_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}

.github/workflows/run-tests.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Run Maven Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
pull_request:
8+
# The branches below must be a subset of the branches above
9+
branches: [ main, master ]
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up JDK 11
18+
uses: actions/setup-java@v1
19+
with:
20+
java-version: 11
21+
22+
- name: Load local Maven repository cache
23+
uses: actions/cache@v2
24+
with:
25+
path: ~/.m2/repository
26+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
27+
restore-keys: |
28+
${{ runner.os }}-maven-
29+
30+
- name: Run tests
31+
run: mvn clean verify

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 QBiC
3+
Copyright (c) 2018-2024 University of Tübingen
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)