diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 1cea2f5..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: Gameyfin CI Pipeline - -on: - push: - branches: - - main - pull_request: - types: [opened, synchronize, reopened] - workflow_dispatch: - -jobs: - build: - name: Build, Test & Scan - runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, '[ci skip]')" - steps: - - name: Git checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - - name: Set up JDK - uses: actions/setup-java@v4 - with: - java-version: '21' - distribution: 'temurin' - - - name: Cache SonarCloud packages - uses: actions/cache@v4 - with: - path: ~/.sonar/cache - key: ${{ runner.os }}-sonar - restore-keys: ${{ runner.os }}-sonar - - - name: Cache Maven packages - uses: actions/cache@v4 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - - - name: Extract Maven project version - id: project - run: echo "GAMEYFIN_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT - - - name: Build and analyze - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=grimsi_gameyfin - - - name: Upload build artifact - uses: actions/upload-artifact@v4 - with: - name: gameyfin-${{ steps.project.outputs.GAMEYFIN_VERSION }}.jar - path: backend/target/gameyfin-*.jar diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml deleted file mode 100644 index c745f41..0000000 --- a/.github/workflows/docker-build-push.yml +++ /dev/null @@ -1,92 +0,0 @@ -name: Gameyfin Docker Build & Push - -on: - workflow_dispatch: - inputs: - branch: - description: "The branch to checkout when cutting the release." - required: true - default: "main" - tag: - description: "Docker image tag." - required: true - default: "X.Y.Z" - -jobs: - release: - runs-on: ubuntu-latest - name: Release - steps: - - name: Git checkout - uses: actions/checkout@v4 - with: - ref: ${{ github.event.inputs.branch }} - - - name: Set up JDK - uses: actions/setup-java@v4 - with: - java-version: '21' - distribution: 'temurin' - cache: 'maven' - - - name: Configure Git User - run: | - git config user.email "actions@github.com" - git config user.name "GitHub Actions" - - - name: Maven Package - run: mvn package -B -s .maven_settings.xml -DreleaseVersion=${{ github.event.inputs.tag }} -Darguments="-Dmaven.deploy.skip=true -Dmaven.test.skip=true -Dmaven.javadoc.skip=true" - env: - GITHUB_ACTOR: ${{ github.actor }} - GITHUB_TOKEN: ${{ github.token }} - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: | - grimsi/gameyfin - tags: | - type=semver,pattern={{version}},value=${{ github.event.inputs.tag }} - type=semver,pattern={{major}}.{{minor}},value=${{ github.event.inputs.tag }} - type=semver,pattern={{major}},value=${{ github.event.inputs.tag }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Cache Docker layers - uses: actions/cache@v4 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: . - file: ./docker/Dockerfile - platforms: linux/amd64,linux/arm64 - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - - # Temp fix - # https://github.com/docker/build-push-action/issues/252 - # https://github.com/moby/buildkit/issues/1896 - name: Move Docker cache (temp fix) - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache diff --git a/.github/workflows/pluginapi-release.yml b/.github/workflows/pluginapi-release.yml new file mode 100644 index 0000000..5d45f2e --- /dev/null +++ b/.github/workflows/pluginapi-release.yml @@ -0,0 +1,35 @@ +name: Plugin-API Release + +on: + push: + tags: + - '*' + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Java + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 17 + cache: gradle + + - name: Decrypt and import GPG key + run: | + echo "$GPG_PRIVATE_KEY" | gpg --batch --import + env: + GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} + + - name: Build and deploy with JReleaser + run: ./gradlew jreleaserFullRelease + env: + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + MAVENCENTRAL_USERNAME: ${{ secrets.MAVENCENTRAL_USERNAME }} + MAVENCENTRAL_TOKEN: ${{ secrets.MAVENCENTRAL_TOKEN }} + JRELEASER_GITHUB_TOKEN: ${{ GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index ba192e7..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,114 +0,0 @@ -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@v4 - with: - ref: ${{ github.event.inputs.branch }} - - - name: Set up JDK - uses: actions/setup-java@v4 - with: - java-version: '21' - distribution: 'temurin' - cache: 'maven' - - - 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 }} -Darguments="-Dmaven.deploy.skip=true -Dmaven.test.skip=true -Dmaven.javadoc.skip=true" - env: - GITHUB_ACTOR: ${{ github.actor }} - GITHUB_TOKEN: ${{ github.token }} - - - name: Git tag - uses: mathieudutour/github-tag-action@v6.2 - 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 - automatic_release_tag: v${{ github.event.inputs.releaseVersion }} - files: | - LICENSE.md - backend/target/gameyfin-*.jar - config/gameyfin.properties - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: | - grimsi/gameyfin - tags: | - type=semver,pattern={{version}},value=${{ github.event.inputs.releaseVersion }} - type=semver,pattern={{major}}.{{minor}},value=${{ github.event.inputs.releaseVersion }} - type=semver,pattern={{major}},value=${{ github.event.inputs.releaseVersion }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Cache Docker layers - uses: actions/cache@v4 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: . - file: ./docker/Dockerfile - platforms: linux/amd64,linux/arm64 - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - - # Temp fix - # https://github.com/docker/build-push-action/issues/252 - # https://github.com/moby/buildkit/issues/1896 - name: Move Docker cache (temp fix) - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache diff --git a/.gitignore b/.gitignore index bbaa093..4991fba 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,10 @@ +node_modules HELP.md -target/ -!.mvn/wrapper/maven-wrapper.jar -!**/src/main/**/target/ -!**/src/test/**/target/ +.gradle +build/ +!gradle/wrapper/gradle-wrapper.jar +!**/src/main/**/build/ +!**/src/test/**/build/ ### STS ### .apt_generated @@ -12,12 +14,18 @@ target/ .settings .springBeans .sts4-cache +bin/ +!**/src/main/**/bin/ +!**/src/test/**/bin/ ### IntelliJ IDEA ### .idea *.iws *.iml *.ipr +out/ +!**/src/main/**/out/ +!**/src/test/**/out/ ### NetBeans ### /nbproject/private/ @@ -25,16 +33,22 @@ target/ /dist/ /nbdist/ /.nb-gradle/ -build/ -!**/src/main/**/build/ -!**/src/test/**/build/ ### VS Code ### .vscode/ -/.mvn/ + +### Kotlin ### +.kotlin ### Custom ### -/data/ -/backend/src/main/resources/static/ -/docker/docker-compose.yml -/.gameyfin/ +/generated +/db +/data +/packaged_plugins +/logs +/templates +/app/src/main/bundles/ +/app/src/main/frontend/**/*.js +/app/src/main/frontend/**/*.js.map +/app/src/main/frontend/generated/ +/torrent_dotfiles/ diff --git a/.maven_settings.xml b/.maven_settings.xml deleted file mode 100644 index 2d0b3b8..0000000 --- a/.maven_settings.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - github - ${env.GITHUB_ACTOR} - ${env.GITHUB_TOKEN} - - - diff --git a/.run/Angular Application.run.xml b/.run/Angular Application.run.xml deleted file mode 100644 index 4346cac..0000000 --- a/.run/Angular Application.run.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.run/Angular CLI Server.run.xml b/.run/Angular CLI Server.run.xml deleted file mode 100644 index 60749b4..0000000 --- a/.run/Angular CLI Server.run.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - -