mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 21:33:15 -07:00
ci: 👷 Finished build and PR pipelines
This commit is contained in:
parent
9287d83c13
commit
44e573d993
2 changed files with 104 additions and 95 deletions
156
.github/workflows/build.yml
vendored
156
.github/workflows/build.yml
vendored
|
@ -2,8 +2,7 @@ name: CI Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
# branches: [ develop, feature/** ]
|
branches: [ develop, master ]
|
||||||
branches: [ releaseNotes ]
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-ui:
|
build-ui:
|
||||||
|
@ -54,40 +53,35 @@ jobs:
|
||||||
cd src
|
cd src
|
||||||
dotnet test --logger trx --results-directory "TestResults"
|
dotnet test --logger trx --results-directory "TestResults"
|
||||||
|
|
||||||
## Don't need yet
|
versioning:
|
||||||
# - name: Upload dotnet test results
|
runs-on: ubuntu-latest
|
||||||
# uses: actions/upload-artifact@v2
|
outputs:
|
||||||
# with:
|
changelog: ${{ steps.changelog.outputs.clean_changelog }}
|
||||||
# name: dotnet-results
|
tag: ${{ steps.changelog.outputs.tag }}
|
||||||
# path: src/TestResults
|
version: ${{ steps.changelog.outputs.version }}
|
||||||
# # Use always() to always run this step to publish test results when there are test failures
|
steps:
|
||||||
# if: ${{ always() }}
|
- uses: actions/checkout@v2
|
||||||
|
# This is only to get the next version number so we can set the version before compile
|
||||||
|
- name: Conventional Changelog Action
|
||||||
|
id: changelog
|
||||||
|
uses: TriPSs/conventional-changelog-action@v3
|
||||||
|
with:
|
||||||
|
skip-version-file: 'true'
|
||||||
|
skip-commit: 'true'
|
||||||
|
version-file: 'version.json'
|
||||||
|
output-file: 'false'
|
||||||
|
skip-on-empty: 'false'
|
||||||
|
git-push: 'false'
|
||||||
|
|
||||||
# versioning:
|
- name: Output version
|
||||||
# runs-on: ubuntu-latest
|
run: |
|
||||||
# steps:
|
echo "outputs: ${{ steps.changelog.outputs.tag }}"
|
||||||
# - uses: actions/checkout@v2
|
echo "Version: ${{ steps.changelog.outputs.version }}"
|
||||||
# # This is only to get the next version number so we can set the version before compile
|
echo "log: ${{ steps.changelog.outputs.clean_changelog }}"
|
||||||
# - name: Conventional Changelog Action
|
|
||||||
# id: changelog
|
|
||||||
# uses: TriPSs/conventional-changelog-action@v3
|
|
||||||
# with:
|
|
||||||
# github-token: ${{ secrets.github_token }}
|
|
||||||
# skip-version-file: 'true'
|
|
||||||
# skip-commit: 'true'
|
|
||||||
# version-file: 'version.json'
|
|
||||||
# output-file: 'false'
|
|
||||||
# skip-on-empty: 'false'
|
|
||||||
|
|
||||||
# - name: Output version
|
|
||||||
# run: |
|
|
||||||
# echo "outputs: ${{ steps.changelog.outputs.tag }}"
|
|
||||||
# echo "Version: ${{ steps.changelog.outputs.version }}"
|
|
||||||
# echo "log: ${{ steps.changelog.outputs.clean_changelog }}"
|
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [ build-ui ]
|
needs: [ build-ui, versioning ]
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
@ -120,22 +114,22 @@ jobs:
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-nuget
|
${{ runner.os }}-nuget
|
||||||
|
|
||||||
# This is only to get the next version number so we can set the version before compile
|
# - name: Conventional Changelog Action
|
||||||
- name: Conventional Changelog Action
|
# id: changelog
|
||||||
id: changelog
|
# uses: TriPSs/conventional-changelog-action@v3.7.1
|
||||||
uses: TriPSs/conventional-changelog-action@v3
|
# with:
|
||||||
with:
|
# github-token: ${{ secrets.WORKFLOW_PAT }}
|
||||||
github-token: ${{ secrets.github_token }}
|
# git-message: 'chore(release): {version}'
|
||||||
skip-version-file: 'true'
|
# version-file: 'version.json'
|
||||||
skip-commit: 'true'
|
# output-file: 'CHANGELOG.md'
|
||||||
version-file: 'version.json'
|
# skip-on-empty: 'false'
|
||||||
output-file: 'false'
|
#env:
|
||||||
skip-on-empty: 'false'
|
# ENV: 'dont-use-git'
|
||||||
|
|
||||||
- name: Set Backend Version
|
- name: Set Backend Version
|
||||||
run: |
|
run: |
|
||||||
dotnet tool install -g dotnet-setversion
|
dotnet tool install -g dotnet-setversion
|
||||||
setversion -r ${{ steps.changelog.outputs.version }}
|
setversion -r ${{ needs.versioning.outputs.version }}
|
||||||
working-directory: src
|
working-directory: src
|
||||||
|
|
||||||
- name: Publish Backend ${{ matrix.os }}
|
- name: Publish Backend ${{ matrix.os }}
|
||||||
|
@ -176,7 +170,41 @@ jobs:
|
||||||
./src/Ombi/${{ matrix.os }}.${{ matrix.format }}
|
./src/Ombi/${{ matrix.os }}.${{ matrix.format }}
|
||||||
|
|
||||||
release:
|
release:
|
||||||
needs: [ publish, unit-test ]
|
needs: [ publish, unit-test, versioning ]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Download Artifacts
|
||||||
|
id: download
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: artifacts
|
||||||
|
|
||||||
|
- name: Publish to GitHub Master
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
if: contains(github.ref, 'master')
|
||||||
|
with:
|
||||||
|
body: ${{ needs.versioning.outputs.changelog }}
|
||||||
|
name: ${{ needs.versioning.outputs.tag }}
|
||||||
|
tag_name: ${{ needs.versioning.outputs.tag }}
|
||||||
|
files: |
|
||||||
|
artifacts/**/*.tar.gz
|
||||||
|
artifacts/**/*.zip
|
||||||
|
|
||||||
|
- name: Publish to GitHub Develop
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
if: contains(github.ref, 'develop')
|
||||||
|
with:
|
||||||
|
prerelease: true
|
||||||
|
body: ${{ needs.versioning.outputs.changelog }}
|
||||||
|
name: ${{ needs.versioning.outputs.tag }}
|
||||||
|
tag_name: ${{ needs.versioning.outputs.tag }}
|
||||||
|
files: |
|
||||||
|
artifacts/**/*.tar.gz
|
||||||
|
artifacts/**/*.zip
|
||||||
|
|
||||||
|
update-changelog:
|
||||||
|
needs: [ release ]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
@ -184,40 +212,14 @@ jobs:
|
||||||
id: changelog
|
id: changelog
|
||||||
uses: TriPSs/conventional-changelog-action@v3
|
uses: TriPSs/conventional-changelog-action@v3
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.github_token }}
|
|
||||||
git-message: 'chore(release): {version}'
|
|
||||||
version-file: 'version.json'
|
version-file: 'version.json'
|
||||||
output-file: 'CHANGELOG.md'
|
skip-on-empty: 'false'
|
||||||
|
git-message: 'chore(release): :rocket: {version}'
|
||||||
- name: Download Artifacts
|
|
||||||
id: download
|
|
||||||
uses: actions/download-artifact@v2
|
|
||||||
with:
|
|
||||||
path: artifacts
|
|
||||||
|
|
||||||
- name: Publish to GitHub
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
with:
|
|
||||||
body: ${{ steps.changelog.outputs.clean_changelog }}
|
|
||||||
draft: 'true'
|
|
||||||
name: ${{ steps.changelog.outputs.tag }}
|
|
||||||
tag_name: ${{ steps.changelog.outputs.tag }}
|
|
||||||
files: |
|
|
||||||
artifacts/**/*.tar.gz
|
|
||||||
artifacts/**/*.zip
|
|
||||||
|
|
||||||
# - name: Publish to GitHub
|
|
||||||
# uses: softprops/action-gh-release@v1
|
|
||||||
# # if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
# with:
|
|
||||||
# body: 'Test'
|
|
||||||
# draft: 'true'
|
|
||||||
# name: 'Test'
|
|
||||||
# files: |
|
|
||||||
# artifacts/**/*.tar.gz
|
|
||||||
# artifacts/**/*.zip
|
|
||||||
|
|
||||||
|
update-apt:
|
||||||
|
needs: [ release ]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
- name: Trigger APT Build
|
- name: Trigger APT Build
|
||||||
uses: fjogeleit/http-request-action@master
|
uses: fjogeleit/http-request-action@master
|
||||||
with:
|
with:
|
||||||
|
|
29
.github/workflows/pr.yml
vendored
29
.github/workflows/pr.yml
vendored
|
@ -2,7 +2,7 @@ name: PR Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ develop ]
|
types: [opened, synchronize, reopened]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-ui:
|
build-ui:
|
||||||
|
@ -46,19 +46,26 @@ jobs:
|
||||||
cd src
|
cd src
|
||||||
dotnet test --logger trx --results-directory "TestResults"
|
dotnet test --logger trx --results-directory "TestResults"
|
||||||
|
|
||||||
## Don't need yet
|
analysis:
|
||||||
# - name: Upload dotnet test results
|
runs-on: ubuntu-latest
|
||||||
# uses: actions/upload-artifact@v2
|
steps:
|
||||||
# with:
|
- uses: actions/checkout@v2
|
||||||
# name: dotnet-results
|
with:
|
||||||
# path: src/TestResults
|
# Disabling shallow clone is recommended for improving relevancy of reporting
|
||||||
# # Use always() to always run this step to publish test results when there are test failures
|
fetch-depth: 0
|
||||||
# if: ${{ always() }}
|
- name: SonarCloud Scan
|
||||||
|
uses: sonarsource/sonarcloud-github-action@master
|
||||||
|
with:
|
||||||
|
args: >
|
||||||
|
-Dsonar.organization=ombi-app
|
||||||
|
-Dsonar.projectKey=Ombi-app_Ombi
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [ build-ui ]
|
needs: [ unit-test ]
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue