mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-16 16:20:04 +00:00
Add release steps to CI pipeline
This commit is contained in:
@@ -6,29 +6,43 @@ on:
|
|||||||
- master
|
- master
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, synchronize, reopened]
|
types: [opened, synchronize, reopened]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build, Test & Scan
|
name: Build, Test & Scan
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: "!contains(github.event.head_commit.message, '[ci skip]')"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- name: Git checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up JDK
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
java-version: '18'
|
java-version: '18'
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
cache: 'maven'
|
cache: 'maven'
|
||||||
|
|
||||||
|
- name: Extract Maven project version
|
||||||
|
id: project
|
||||||
|
run: echo "GAMEYFIN_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Show extracted Maven project version
|
||||||
|
run: echo "${{ steps.project.outputs.GAMEYFIN_VERSION }}"
|
||||||
|
|
||||||
- name: Maven build
|
- name: Maven build
|
||||||
run: mvn --batch-mode --update-snapshots package
|
run: mvn --batch-mode --update-snapshots package
|
||||||
|
|
||||||
- name: SonarQube scan
|
- name: SonarQube scan
|
||||||
uses: kitabisa/sonarqube-action@v1.2.0
|
uses: kitabisa/sonarqube-action@v1.2.0
|
||||||
with:
|
with:
|
||||||
host: ${{ secrets.SONARQUBE_HOST }}
|
host: https://sonarqube.grimsi.de
|
||||||
login: ${{ secrets.SONARQUBE_TOKEN }}
|
login: ${{ secrets.SONARQUBE_TOKEN }}
|
||||||
projectKey: ${{ secrets.SONARQUBE_PROJECTKEY }}
|
projectKey: grimsi_gameyfin_AYPM67pzsxiaNzCh9BZd
|
||||||
|
|
||||||
- name: Upload build artifact
|
- name: Upload build artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: backend
|
name: gameyfin-${{ steps.project.outputs.GAMEYFIN_VERSION }}.jar
|
||||||
path: backend/target/gameyfin-*.jar
|
path: backend/target/gameyfin-*.jar
|
||||||
|
|||||||
@@ -0,0 +1,65 @@
|
|||||||
|
name: Gameyfin Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
branch:
|
||||||
|
description: "The branch to checkout when cutting the release."
|
||||||
|
required: true
|
||||||
|
default: "main"
|
||||||
|
releaseVersion:
|
||||||
|
description: "Default version to use when preparing a release."
|
||||||
|
required: true
|
||||||
|
default: "X.Y.Z"
|
||||||
|
developmentVersion:
|
||||||
|
description: "Default version to use for new local working copy."
|
||||||
|
required: true
|
||||||
|
default: "X.Y.Z-SNAPSHOT"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Release
|
||||||
|
steps:
|
||||||
|
- name: Git checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.inputs.branch }}
|
||||||
|
|
||||||
|
- name: Set up JDK
|
||||||
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
java-version: '18'
|
||||||
|
distribution: 'temurin'
|
||||||
|
cache: 'maven'
|
||||||
|
|
||||||
|
- name: Maven build
|
||||||
|
run: mvn --batch-mode --update-snapshots package -Dmaven.test.skip=true
|
||||||
|
|
||||||
|
- name: Configure Git User
|
||||||
|
run: |
|
||||||
|
git config user.email "actions@github.com"
|
||||||
|
git config user.name "GitHub Actions"
|
||||||
|
|
||||||
|
- name: Maven Release
|
||||||
|
run: mvn release:prepare release:perform -B -s .maven_settings.xml -DreleaseVersion=${{ github.event.inputs.releaseVersion }} -DdevelopmentVersion=${{ github.event.inputs.developmentVersion }}
|
||||||
|
env:
|
||||||
|
GITHUB_ACTOR: ${{ github.actor }}
|
||||||
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
|
|
||||||
|
- name: Git tag
|
||||||
|
uses: mathieudutour/github-tag-action@v6.0
|
||||||
|
with:
|
||||||
|
github_token: ${{ github.token }}
|
||||||
|
default_bump: false
|
||||||
|
custom_tag: ${{ github.event.inputs.releaseVersion }}
|
||||||
|
|
||||||
|
- name: Github Release
|
||||||
|
uses: "marvinpinto/action-automatic-releases@v1.2.1"
|
||||||
|
with:
|
||||||
|
repo_token: ${{ github.token }}
|
||||||
|
prerelease: false
|
||||||
|
files: |
|
||||||
|
LICENSE.md
|
||||||
|
backend/target/gameyfin-*.jar
|
||||||
|
config/gameyfin.properties
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<settings xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
|
||||||
|
<servers>
|
||||||
|
<server>
|
||||||
|
<id>github</id>
|
||||||
|
<username>${env.GITHUB_ACTOR}</username>
|
||||||
|
<password>${env.GITHUB_TOKEN}</password>
|
||||||
|
</server>
|
||||||
|
</servers>
|
||||||
|
</settings>
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
# Uncomment if you want to change the port from 8080
|
||||||
|
# server.port=8081
|
||||||
|
|
||||||
|
# Gameyfin admin interface username and password
|
||||||
|
gameyfin.user=<your username here>
|
||||||
|
gameyfin.password=<your password here>
|
||||||
|
|
||||||
|
# Gameyfin source folders
|
||||||
|
gameyfin.sources=<comma-seperated list of root folders of your game libraries>
|
||||||
|
|
||||||
|
# Uncomment if you want to specify the Gameyfin database path (default is <game library root>/.gameyfin/db)
|
||||||
|
# gameyfin.db=<custom path to db file>
|
||||||
|
|
||||||
|
# Uncomment if you want to specify the Gameyfin cache path (default is <game library root>/.gameyfin/cache)
|
||||||
|
# gameyfin.cache=<custom path to cache folder>
|
||||||
|
|
||||||
|
# Your twitch client-id and client-secret
|
||||||
|
gameyfin.igdb.api.client-id=<your twitch client-id here>
|
||||||
|
gameyfin.igdb.api.client-secret=<your twitch client-secret here>
|
||||||
@@ -1,25 +1,45 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<groupId>de.grimsi</groupId>
|
<groupId>de.grimsi</groupId>
|
||||||
<artifactId>gameyfin</artifactId>
|
<artifactId>gameyfin</artifactId>
|
||||||
<version>1.2.2-SNAPSHOT</version>
|
<version>1.2.2-SNAPSHOT</version>
|
||||||
<name>gameyfin</name>
|
<name>gameyfin</name>
|
||||||
<description>gameyfin</description>
|
<description>gameyfin</description>
|
||||||
|
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>frontend</module>
|
<module>frontend</module>
|
||||||
<module>backend</module>
|
<module>backend</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>2.7.1</version>
|
<version>2.7.1</version>
|
||||||
<relativePath/> <!-- lookup parent from repository -->
|
<relativePath/> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
<scm>
|
||||||
|
<connection>scm:git:https://github.com/grimsi/gameyfin.git</connection>
|
||||||
|
<url>scm:git:https://github.com/grimsi/gameyfin.git</url>
|
||||||
|
<developerConnection>scm:git:https://github.com/grimsi/gameyfin.git</developerConnection>
|
||||||
|
<tag>HEAD</tag>
|
||||||
|
</scm>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-release-plugin</artifactId>
|
||||||
|
<version>2.5.3</version>
|
||||||
|
<configuration>
|
||||||
|
<scmCommentPrefix>[ci skip]</scmCommentPrefix>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -1,2 +1,4 @@
|
|||||||
|
sonar.projectKey=grimsi_gameyfin_AYPM67pzsxiaNzCh9BZd
|
||||||
|
|
||||||
# Point SONAR to the compiled Java classes
|
# Point SONAR to the compiled Java classes
|
||||||
sonar.java.binaries=./backend/target
|
sonar.java.binaries=./backend/target
|
||||||
|
|||||||
Reference in New Issue
Block a user