Skip to content

Commit

Permalink
Add build actions
Browse files Browse the repository at this point in the history
  • Loading branch information
dfuchss committed Nov 2, 2023
1 parent 09eade3 commit cf4abfa
Show file tree
Hide file tree
Showing 5 changed files with 139 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @kit-sdq/programming-lecture
22 changes: 22 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "wednesday"
time: "11:00"
timezone: "Europe/Berlin"
commit-message:
prefix: "Dependency"
include: "scope"
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "weekly"
day: "wednesday"
time: "11:00"
timezone: "Europe/Berlin"
commit-message:
prefix: "Dependency"
include: "scope"
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Artemis Score Stats (Release)

on:
push:
tags: "v**"
workflow_dispatch:

jobs:
build:
name: "Create release for new version"
runs-on: macos-latest

steps:
- uses: actions/[email protected]
with:
submodules: true

- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17

- name: Build Artemis4J
shell: bash
working-directory: "artemis4j"
run: mvn clean install -DskipTests

- name: Build with Maven
run: mvn -B clean package

- name: GitHub Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
files: |
target/artemis-score-stats-complete.jar
22 changes: 22 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Stale PRs
on:
workflow_dispatch:
schedule:
- cron: "1 12 * * *"

jobs:
stale:
if: github.repository_owner == 'kit-sdq'
runs-on: ubuntu-latest
steps:
- name: Check for stale PRs
uses: actions/stale@v8
with:
days-before-stale: 7
days-before-close: 14
days-before-issue-stale: -1
remove-stale-when-updated: true
stale-pr-label: "stale"
exempt-pr-labels: "no-stale"
stale-pr-message: 'This PR is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
close-pr-message: 'This PR was closed because it has been stalled for 14 days with no activity.'
57 changes: 57 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Artemis Score Stats (PRs & Main Branch)

on:
push:
branches: [ main ]
paths-ignore:
- '**.md'
pull_request:
branches:
- main
workflow_dispatch:

jobs:
build:
name: "Full build"
runs-on: ubuntu-latest

steps:
- uses: actions/[email protected]
with:
submodules: true

- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17

- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-

- name: Build Artemis4J
shell: bash
working-directory: "artemis4j"
run: mvn -U clean install -DskipTests

- name: Cache Distributions
uses: actions/cache@v3
with:
path: ./dist
key: cache-dist-${{github.run_id}}

- name: Verify with Maven
run: mvn -B clean verify

- name: Build with Maven
run: mvn -B clean package -DskipTests

- name: Save Final JAR
uses: actions/upload-artifact@v3
with:
name: "JAR File"
path: "target/artemis-score-stats-complete.jar"

0 comments on commit cf4abfa

Please sign in to comment.