Skip to content

Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.

Feature/version bump (#456)

Robbie Davis912469de1254
diff --git a/.github/workflows/sonar-scan.yml b/.github/workflows/sonar-scan.yml
index fddfa4cc5..fef98472e 100644
--- a/.github/workflows/sonar-scan.yml
+++ b/.github/workflows/sonar-scan.yml
@@ -2,7 +2,7 @@ name: .NET Build Test and Sonar Scan
on:
push:
- branches: [ main, develop ]
+ branches: '**'
pull_request:
branches: [ main, develop ]
types: [opened, synchronize, reopened]
@@ -93,63 +93,14 @@ jobs:
- name: Test
run: dotnet test --no-restore --verbosity normal
- bump:
- name: Create branch for bump if Develop push
- runs-on: ubuntu-latest
- needs: [ build, test ]
- if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }}
- steps:
- - uses: actions/checkout@v2
- - uses: actions/download-artifact@v2
-
- - name: Get csproj Version
- uses: naminodarie/get-net-sdk-project-versions-action@v1
- id: get-version
- with:
- proj-path: Kavita.Common/Kavita.Common.csproj
-
- - name: Get branch name
- id: branch-name
- uses: tj-actions/[email protected]
-
- - name: Echo branch name
- run: echo "${{ steps.branch-name.outputs.current_branch }}"
-
- - name: Echo csproj version
- run: echo "${{steps.get-version.outputs.assembly-version}}"
-
- - name: Create Branch
- uses: peterjgrainger/[email protected]
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- branch: "version-bump-${{steps.get-version.outputs.assembly-version}}"
-
version:
- name: Bump version if Develop push
- needs: [ bump ]
+ name: Bump version on Develop push
+ needs: [ build, test ]
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }}
steps:
-
- - name: Download a single artifact
- uses: actions/download-artifact@v2
- with:
- name: csproj
-
- - name: Get csproj Version
- uses: naminodarie/get-net-sdk-project-versions-action@v1
- id: get-version
- with:
- proj-path: Kavita.Common.csproj
-
- - name: Get branch name
- id: branch-name
- uses: tj-actions/[email protected]
-
- uses: actions/checkout@v2
with:
- ref: version-bump-${{steps.get-version.outputs.assembly-version}}
fetch-depth: 0
- name: Setup .NET Core
@@ -167,10 +118,16 @@ jobs:
uses: SiqiLu/dotnet-bump-version@master
with:
version_files: Kavita.Common/Kavita.Common.csproj
- github_token: ${{ secrets.GITHUB_TOKEN }}
+ github_token: ${{ secrets.REPO_GHA_PAT }}
- - name: Trigger Docker Nightly
- if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }}
+ develop:
+ name: Trigger Nightly Docker if Develop push
+ needs: [ build, test, version ]
+ runs-on: ubuntu-latest
+ if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }}
+ steps:
+
+ - name: If Push to Develop, Trigger Docker Stable
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Build Nightly Docker
@@ -180,12 +137,11 @@ jobs:
name: Trigger Stable Docker if Main push
needs: [ build, test ]
runs-on: ubuntu-latest
- if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }}
+ if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
steps:
- name: If Push to Main, Trigger Docker Stable
- if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Build Stable Docker
- token: ${{ secrets.REPO_GHA_PAT }}
\ No newline at end of file
+ token: ${{ secrets.REPO_GHA_PAT }}
diff --git a/Kavita.Common/Kavita.Common.csproj b/Kavita.Common/Kavita.Common.csproj
index fbba64189..530819ef9 100644
--- a/Kavita.Common/Kavita.Common.csproj
+++ b/Kavita.Common/Kavita.Common.csproj
@@ -19,4 +19,4 @@
</ItemGroup>
-</Project>
+</Project>
\ No newline at end of file