mirror of https://github.com/Ombi-app/Ombi
commit
d1d4a7bcf6
@ -1,118 +0,0 @@
|
||||
|
||||
variables:
|
||||
- template: templates/variables.yml
|
||||
|
||||
stages:
|
||||
- stage: build
|
||||
jobs:
|
||||
- job: Build
|
||||
pool:
|
||||
vmImage: ${{ variables.vmImage }}
|
||||
steps:
|
||||
- template: templates/build-steps.yml
|
||||
|
||||
- stage: publish
|
||||
jobs:
|
||||
- job:
|
||||
strategy:
|
||||
matrix:
|
||||
win10-x64:
|
||||
runtime: win10-x64
|
||||
format: zip
|
||||
compression: zip
|
||||
win10-x86:
|
||||
runtime: win10-x86
|
||||
format: zip
|
||||
compression: zip
|
||||
osx-x64:
|
||||
runtime: osx-x64
|
||||
format: tar.gz
|
||||
compression: tar
|
||||
linux-x64:
|
||||
runtime: linux-x64
|
||||
format: tar.gz
|
||||
compression: tar
|
||||
linux-arm:
|
||||
runtime: linux-arm
|
||||
format: tar.gz
|
||||
compression: tar
|
||||
linux-arm64:
|
||||
runtime: linux-arm64
|
||||
format: tar.gz
|
||||
compression: tar
|
||||
pool:
|
||||
vmImage: ${{ variables.vmImage }}
|
||||
steps:
|
||||
- template: templates/publish-os-steps.yml
|
||||
|
||||
- stage: deploy
|
||||
jobs:
|
||||
- job:
|
||||
condition: and(succeeded(), eq(variables.isMain, true))
|
||||
steps:
|
||||
- task: DownloadPipelineArtifact@2
|
||||
inputs:
|
||||
buildType: 'current'
|
||||
targetPath: '$(System.ArtifactsDirectory)'
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: 'Get Release Notes'
|
||||
inputs:
|
||||
targetType: 'inline'
|
||||
script: |
|
||||
$response = Invoke-WebRequest -Uri "https://ombireleasenote.azurewebsites.net/api/ReleaseNotesFunction?buildId=$(Build.BuildId)"
|
||||
Write-Host "##vso[task.setvariable variable=ReleaseNotes;]$response"
|
||||
|
||||
- task: GitHubRelease@1
|
||||
displayName: 'Ombi.Releases Release'
|
||||
inputs:
|
||||
gitHubConnection: 'PAT'
|
||||
repositoryName: 'Ombi-app/Ombi.Releases'
|
||||
action: 'create'
|
||||
target: 'c7fcbb77b58aef1076d635a9ef99e4374abc8672'
|
||||
tagSource: 'userSpecifiedTag'
|
||||
tag: '$(gitTag)'
|
||||
releaseNotesSource: 'inline'
|
||||
releaseNotesInline: '$(ReleaseNotes)'
|
||||
assets: |
|
||||
$(System.ArtifactsDirectory)/**/*.zip
|
||||
$(System.ArtifactsDirectory)/**/*.tar.gz
|
||||
isPreRelease: true
|
||||
changeLogCompareToRelease: 'lastNonDraftRelease'
|
||||
changeLogType: 'commitBased'
|
||||
|
||||
- task: GitHubRelease@1
|
||||
displayName: 'Ombi Release'
|
||||
inputs:
|
||||
gitHubConnection: 'PAT'
|
||||
repositoryName: 'Ombi-app/Ombi'
|
||||
action: 'create'
|
||||
target: '$(Build.SourceVersion)'
|
||||
tagSource: 'userSpecifiedTag'
|
||||
tag: '$(gitTag)'
|
||||
releaseNotesSource: 'inline'
|
||||
releaseNotesInline: '$(ReleaseNotes)'
|
||||
assets: |
|
||||
$(System.ArtifactsDirectory)/**/*.zip
|
||||
$(System.ArtifactsDirectory)/**/*.tar.gz
|
||||
isPreRelease: true
|
||||
changeLogCompareToRelease: 'lastNonDraftRelease'
|
||||
changeLogType: 'commitBased'
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: "Trigger APT build"
|
||||
inputs:
|
||||
targetType: 'inline'
|
||||
script: |
|
||||
$body = @{
|
||||
"ref"="main"
|
||||
"inputs"= @{"version"= "$(gitTag)"}
|
||||
} | ConvertTo-Json
|
||||
|
||||
$header = @{
|
||||
"Accept"="application/vnd.github.v3+json"
|
||||
"Authorization"="Bearer $(APTPAT)"
|
||||
"User-Agent"="Ombi"
|
||||
}
|
||||
|
||||
Invoke-RestMethod -Uri "https://api.github.com/repos/Ombi-app/Ombi.Apt/actions/workflows/build-deb.yml/dispatches" -Method 'Post' -Body $body -Headers $header
|
@ -1,34 +0,0 @@
|
||||
steps:
|
||||
## This is needed due to https://github.com/microsoft/azure-pipelines-tasks/issues/8429
|
||||
## For the set version tool...
|
||||
- task: DotNetCoreInstaller@1
|
||||
displayName: 'Use .NET Core sdk '
|
||||
inputs:
|
||||
packageType: 'sdk'
|
||||
version: '5.x'
|
||||
|
||||
- task: Yarn@3
|
||||
displayName: 'Install UI Dependancies'
|
||||
inputs:
|
||||
projectDirectory: '$(UiLocation)'
|
||||
arguments: 'install'
|
||||
|
||||
- task: Yarn@3
|
||||
displayName: 'Build and Publish Angular App'
|
||||
inputs:
|
||||
projectDirectory: '$(UiLocation)'
|
||||
arguments: 'run build'
|
||||
|
||||
- task: PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: '$(UiLocation)dist'
|
||||
artifact: 'angular_dist'
|
||||
publishLocation: 'pipeline'
|
||||
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: Run Unit Tests
|
||||
inputs:
|
||||
command: 'custom'
|
||||
projects: '$(TestProject)'
|
||||
custom: 'test'
|
||||
continueOnError: false
|
@ -1,57 +0,0 @@
|
||||
steps:
|
||||
- task: DotNetCoreInstaller@1
|
||||
displayName: 'Use .NET Core sdk '
|
||||
inputs:
|
||||
packageType: 'sdk'
|
||||
version: '5.x'
|
||||
|
||||
- task: DotNetCoreInstaller@1
|
||||
displayName: 'Use .NET Core sdk for versioning'
|
||||
inputs:
|
||||
packageType: 'sdk'
|
||||
version: '3.1.x'
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: 'Set Version'
|
||||
inputs:
|
||||
targetType: 'inline'
|
||||
script: |
|
||||
dotnet tool install -g dotnet-setversion
|
||||
setversion -r $(BuildVersion)
|
||||
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: 'publish $(runtime)'
|
||||
inputs:
|
||||
command: 'publish'
|
||||
publishWebProjects: true
|
||||
arguments: '-c $(BuildConfiguration) -r "$(runtime)" -o $(Build.ArtifactStagingDirectory)/$(runtime) --self-contained true -p:PublishSingleFile=true'
|
||||
zipAfterPublish: false
|
||||
modifyOutputPath: false
|
||||
|
||||
- task: DownloadPipelineArtifact@2
|
||||
inputs:
|
||||
buildType: 'current'
|
||||
artifactName: 'angular_dist'
|
||||
targetPath: '$(Build.ArtifactStagingDirectory)/angular_dist'
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: 'Copy Angular App $(runtime)'
|
||||
inputs:
|
||||
SourceFolder: '$(Build.ArtifactStagingDirectory)/angular_dist'
|
||||
Contents: '**'
|
||||
TargetFolder: '$(Build.ArtifactStagingDirectory)/$(runtime)/ClientApp/dist'
|
||||
|
||||
- task: ArchiveFiles@2
|
||||
displayName: 'Zip $(runtime)'
|
||||
inputs:
|
||||
rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/$(runtime)'
|
||||
includeRootFolder: false
|
||||
archiveType: $(compression)
|
||||
archiveFile: '$(Build.ArtifactStagingDirectory)/$(runtime).$(format)'
|
||||
replaceExistingArchive: true
|
||||
|
||||
- task: PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: '$(Build.ArtifactStagingDirectory)/$(runtime).$(format)'
|
||||
artifact: '$(runtime)'
|
||||
publishLocation: 'pipeline'
|
@ -1,30 +0,0 @@
|
||||
variables:
|
||||
- name: "BuildConfiguration"
|
||||
value: "Release"
|
||||
|
||||
- name: "vmImage"
|
||||
value: "ubuntu-latest"
|
||||
|
||||
- name: "Solution"
|
||||
value: "**/*.sln"
|
||||
|
||||
- name: "TestProject"
|
||||
value: "**/*.Tests.csproj"
|
||||
|
||||
- name: "NetCoreVersion"
|
||||
value: "5.0"
|
||||
|
||||
- name: "PublishLocation"
|
||||
value: "$(Build.SourcesDirectory)/src/Ombi/bin/Release/netcoreapp$(NetCoreVersion)"
|
||||
|
||||
- name: "GitTag"
|
||||
value: "v$(buildVersion)"
|
||||
|
||||
- name: "UiLocation"
|
||||
value: "$(Build.SourcesDirectory)/src/Ombi/ClientApp/"
|
||||
|
||||
- name: "BuildVersion"
|
||||
value: "4.0.$(Build.BuildId)"
|
||||
|
||||
- name: isMain
|
||||
value: $[or(eq(variables['Build.SourceBranch'], 'refs/heads/develop'), eq(variables['Build.SourceBranch'], 'refs/heads/master'))]
|
@ -1,293 +0,0 @@
|
||||
# -*- coding: utf-8; mode: python -*-
|
||||
##
|
||||
## Format
|
||||
##
|
||||
## ACTION: [AUDIENCE:] COMMIT_MSG [!TAG ...]
|
||||
##
|
||||
## Description
|
||||
##
|
||||
## ACTION is one of 'chg', 'fix', 'new'
|
||||
##
|
||||
## Is WHAT the change is about.
|
||||
##
|
||||
## 'chg' is for refactor, small improvement, cosmetic changes...
|
||||
## 'fix' is for bug fixes
|
||||
## 'new' is for new features, big improvement
|
||||
##
|
||||
## AUDIENCE is optional and one of 'dev', 'usr', 'pkg', 'test', 'doc'
|
||||
##
|
||||
## Is WHO is concerned by the change.
|
||||
##
|
||||
## 'dev' is for developpers (API changes, refactors...)
|
||||
## 'usr' is for final users (UI changes)
|
||||
## 'pkg' is for packagers (packaging changes)
|
||||
## 'test' is for testers (test only related changes)
|
||||
## 'doc' is for doc guys (doc only changes)
|
||||
##
|
||||
## COMMIT_MSG is ... well ... the commit message itself.
|
||||
##
|
||||
## TAGs are additionnal adjective as 'refactor' 'minor' 'cosmetic'
|
||||
##
|
||||
## They are preceded with a '!' or a '@' (prefer the former, as the
|
||||
## latter is wrongly interpreted in github.) Commonly used tags are:
|
||||
##
|
||||
## 'refactor' is obviously for refactoring code only
|
||||
## 'minor' is for a very meaningless change (a typo, adding a comment)
|
||||
## 'cosmetic' is for cosmetic driven change (re-indentation, 80-col...)
|
||||
## 'wip' is for partial functionality but complete subfunctionality.
|
||||
##
|
||||
## Example:
|
||||
##
|
||||
## new: usr: support of bazaar implemented
|
||||
## chg: re-indentend some lines !cosmetic
|
||||
## new: dev: updated code to be compatible with last version of killer lib.
|
||||
## fix: pkg: updated year of licence coverage.
|
||||
## new: test: added a bunch of test around user usability of feature X.
|
||||
## fix: typo in spelling my name in comment. !minor
|
||||
##
|
||||
## Please note that multi-line commit message are supported, and only the
|
||||
## first line will be considered as the "summary" of the commit message. So
|
||||
## tags, and other rules only applies to the summary. The body of the commit
|
||||
## message will be displayed in the changelog without reformatting.
|
||||
|
||||
|
||||
##
|
||||
## ``ignore_regexps`` is a line of regexps
|
||||
##
|
||||
## Any commit having its full commit message matching any regexp listed here
|
||||
## will be ignored and won't be reported in the changelog.
|
||||
##
|
||||
ignore_regexps = [
|
||||
r'@minor', r'!minor',
|
||||
r'@cosmetic', r'!cosmetic',
|
||||
r'@refactor', r'!refactor',
|
||||
r'@wip', r'!wip',
|
||||
r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*[p|P]kg:',
|
||||
r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*[d|D]ev:',
|
||||
r'^(.{3,3}\s*:)?\s*[fF]irst commit.?\s*$',
|
||||
r'^$', ## ignore commits with empty messages
|
||||
]
|
||||
|
||||
|
||||
## ``section_regexps`` is a list of 2-tuples associating a string label and a
|
||||
## list of regexp
|
||||
##
|
||||
## Commit messages will be classified in sections thanks to this. Section
|
||||
## titles are the label, and a commit is classified under this section if any
|
||||
## of the regexps associated is matching.
|
||||
##
|
||||
## Please note that ``section_regexps`` will only classify commits and won't
|
||||
## make any changes to the contents. So you'll probably want to go check
|
||||
## ``subject_process`` (or ``body_process``) to do some changes to the subject,
|
||||
## whenever you are tweaking this variable.
|
||||
##
|
||||
section_regexps = [
|
||||
('**New Features**', [
|
||||
r'^[aA]dded?\s*:?\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
|
||||
r'^[uU]pdated?\s*:?\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
|
||||
r'^[cC]hanged?\s*:?\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
|
||||
]),
|
||||
('**Fixes**', [
|
||||
r'^(?![mM]erge\s*)'
|
||||
]
|
||||
),
|
||||
|
||||
]
|
||||
|
||||
|
||||
## ``body_process`` is a callable
|
||||
##
|
||||
## This callable will be given the original body and result will
|
||||
## be used in the changelog.
|
||||
##
|
||||
## Available constructs are:
|
||||
##
|
||||
## - any python callable that take one txt argument and return txt argument.
|
||||
##
|
||||
## - ReSub(pattern, replacement): will apply regexp substitution.
|
||||
##
|
||||
## - Indent(chars=" "): will indent the text with the prefix
|
||||
## Please remember that template engines gets also to modify the text and
|
||||
## will usually indent themselves the text if needed.
|
||||
##
|
||||
## - Wrap(regexp=r"\n\n"): re-wrap text in separate paragraph to fill 80-Columns
|
||||
##
|
||||
## - noop: do nothing
|
||||
##
|
||||
## - ucfirst: ensure the first letter is uppercase.
|
||||
## (usually used in the ``subject_process`` pipeline)
|
||||
##
|
||||
## - final_dot: ensure text finishes with a dot
|
||||
## (usually used in the ``subject_process`` pipeline)
|
||||
##
|
||||
## - strip: remove any spaces before or after the content of the string
|
||||
##
|
||||
## - SetIfEmpty(msg="No commit message."): will set the text to
|
||||
## whatever given ``msg`` if the current text is empty.
|
||||
##
|
||||
## Additionally, you can `pipe` the provided filters, for instance:
|
||||
#body_process = Wrap(regexp=r'\n(?=\w+\s*:)') | Indent(chars=" ")
|
||||
#body_process = Wrap(regexp=r'\n(?=\w+\s*:)')
|
||||
#body_process = noop
|
||||
body_process = ReSub(r'((^|\n)[A-Z]\w+(-\w+)*: .*(\n\s+.*)*)+$', r'') | strip
|
||||
|
||||
|
||||
## ``subject_process`` is a callable
|
||||
##
|
||||
## This callable will be given the original subject and result will
|
||||
## be used in the changelog.
|
||||
##
|
||||
## Available constructs are those listed in ``body_process`` doc.
|
||||
subject_process = (strip |
|
||||
ReSub(r'^([cC]hanged|[fF]ixed|[aA]dded|[uU]pdated)\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n@]*)(@[a-z]+\s+)*$', r'\4') |
|
||||
SetIfEmpty("No commit message.") | ucfirst | final_dot)
|
||||
|
||||
|
||||
## ``tag_filter_regexp`` is a regexp
|
||||
##
|
||||
## Tags that will be used for the changelog must match this regexp.
|
||||
##
|
||||
tag_filter_regexp = r'^v[0-9]+\.[0-9]+(\.[0-9]+)?$'
|
||||
|
||||
|
||||
## ``unreleased_version_label`` is a string or a callable that outputs a string
|
||||
##
|
||||
## This label will be used as the changelog Title of the last set of changes
|
||||
## between last valid tag and HEAD if any.
|
||||
unreleased_version_label = "(unreleased)"
|
||||
|
||||
|
||||
## ``output_engine`` is a callable
|
||||
##
|
||||
## This will change the output format of the generated changelog file
|
||||
##
|
||||
## Available choices are:
|
||||
##
|
||||
## - rest_py
|
||||
##
|
||||
## Legacy pure python engine, outputs ReSTructured text.
|
||||
## This is the default.
|
||||
##
|
||||
## - mustache(<template_name>)
|
||||
##
|
||||
## Template name could be any of the available templates in
|
||||
## ``templates/mustache/*.tpl``.
|
||||
## Requires python package ``pystache``.
|
||||
## Examples:
|
||||
## - mustache("markdown")
|
||||
## - mustache("restructuredtext")
|
||||
##
|
||||
## - makotemplate(<template_name>)
|
||||
##
|
||||
## Template name could be any of the available templates in
|
||||
## ``templates/mako/*.tpl``.
|
||||
## Requires python package ``mako``.
|
||||
## Examples:
|
||||
## - makotemplate("restructuredtext")
|
||||
##
|
||||
#output_engine = rest_py
|
||||
#output_engine = mustache("restructuredtext")
|
||||
output_engine = mustache("changelog.tpl")
|
||||
#output_engine = makotemplate("restructuredtext")
|
||||
|
||||
|
||||
## ``include_merge`` is a boolean
|
||||
##
|
||||
## This option tells git-log whether to include merge commits in the log.
|
||||
## The default is to include them.
|
||||
include_merge = False
|
||||
|
||||
|
||||
## ``log_encoding`` is a string identifier
|
||||
##
|
||||
## This option tells gitchangelog what encoding is outputed by ``git log``.
|
||||
## The default is to be clever about it: it checks ``git config`` for
|
||||
## ``i18n.logOutputEncoding``, and if not found will default to git's own
|
||||
## default: ``utf-8``.
|
||||
#log_encoding = 'utf-8'
|
||||
|
||||
|
||||
## ``publish`` is a callable
|
||||
##
|
||||
## Sets what ``gitchangelog`` should do with the output generated by
|
||||
## the output engine. ``publish`` is a callable taking one argument
|
||||
## that is an interator on lines from the output engine.
|
||||
##
|
||||
## Some helper callable are provided:
|
||||
##
|
||||
## Available choices are:
|
||||
##
|
||||
## - stdout
|
||||
##
|
||||
## Outputs directly to standard output
|
||||
## (This is the default)
|
||||
##
|
||||
## - FileInsertAtFirstRegexMatch(file, pattern, idx=lamda m: m.start())
|
||||
##
|
||||
## Creates a callable that will parse given file for the given
|
||||
## regex pattern and will insert the output in the file.
|
||||
## ``idx`` is a callable that receive the matching object and
|
||||
## must return a integer index point where to insert the
|
||||
## the output in the file. Default is to return the position of
|
||||
## the start of the matched string.
|
||||
##
|
||||
## - FileRegexSubst(file, pattern, replace, flags)
|
||||
##
|
||||
## Apply a replace inplace in the given file. Your regex pattern must
|
||||
## take care of everything and might be more complex. Check the README
|
||||
## for a complete copy-pastable example.
|
||||
##
|
||||
# publish = FileInsertIntoFirstRegexMatch(
|
||||
# "CHANGELOG.rst",
|
||||
# r'/(?P<rev>[0-9]+\.[0-9]+(\.[0-9]+)?)\s+\([0-9]+-[0-9]{2}-[0-9]{2}\)\n--+\n/',
|
||||
# idx=lambda m: m.start(1)
|
||||
# )
|
||||
#publish = stdout
|
||||
|
||||
def write_to_file(content):
|
||||
with open("CHANGELOG.md", "w+") as f:
|
||||
for chunk in content:
|
||||
f.write(chunk)
|
||||
|
||||
publish = write_to_file
|
||||
|
||||
|
||||
## ``revs`` is a list of callable or a list of string
|
||||
##
|
||||
## callable will be called to resolve as strings and allow dynamical
|
||||
## computation of these. The result will be used as revisions for
|
||||
## gitchangelog (as if directly stated on the command line). This allows
|
||||
## to filter exaclty which commits will be read by gitchangelog.
|
||||
##
|
||||
## To get a full documentation on the format of these strings, please
|
||||
## refer to the ``git rev-list`` arguments. There are many examples.
|
||||
##
|
||||
## Using callables is especially useful, for instance, if you
|
||||
## are using gitchangelog to generate incrementally your changelog.
|
||||
##
|
||||
## Some helpers are provided, you can use them::
|
||||
##
|
||||
## - FileFirstRegexMatch(file, pattern): will return a callable that will
|
||||
## return the first string match for the given pattern in the given file.
|
||||
## If you use named sub-patterns in your regex pattern, it'll output only
|
||||
## the string matching the regex pattern named "rev".
|
||||
##
|
||||
## - Caret(rev): will return the rev prefixed by a "^", which is a
|
||||
## way to remove the given revision and all its ancestor.
|
||||
##
|
||||
## Please note that if you provide a rev-list on the command line, it'll
|
||||
## replace this value (which will then be ignored).
|
||||
##
|
||||
## If empty, then ``gitchangelog`` will act as it had to generate a full
|
||||
## changelog.
|
||||
##
|
||||
## The default is to use all commits to make the changelog.
|
||||
#revs = ["^1.0.3", ]
|
||||
#revs = [
|
||||
# Caret(
|
||||
# FileFirstRegexMatch(
|
||||
# "CHANGELOG.rst",
|
||||
# r"(?P<rev>[0-9]+\.[0-9]+(\.[0-9]+)?)\s+\([0-9]+-[0-9]{2}-[0-9]{2}\)\n--+\n")),
|
||||
# "HEAD"
|
||||
#]
|
||||
revs = []
|
@ -0,0 +1,205 @@
|
||||
name: CI Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ develop, master ]
|
||||
|
||||
jobs:
|
||||
build-ui:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14'
|
||||
|
||||
- name: NodeModules Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
key: node_modules-${{ hashFiles('**/yarn.lock') }}
|
||||
|
||||
- name: UI Install
|
||||
run: yarn --cwd ./src/Ombi/ClientApp install
|
||||
|
||||
- name: Build UI
|
||||
run: yarn --cwd ./src/Ombi/ClientApp run build
|
||||
|
||||
- name: Publish UI Artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: angular_dist
|
||||
path: |
|
||||
./src/Ombi/ClientApp/dist
|
||||
|
||||
unit-test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: '5.0.x'
|
||||
|
||||
- name: Nuget Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.nuget/packages
|
||||
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-nuget
|
||||
|
||||
- name: Run Unit Tests
|
||||
run: |
|
||||
cd src
|
||||
dotnet test -c NonUiBuild --logger trx --results-directory "TestResults"
|
||||
|
||||
versioning:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ build-ui, unit-test ]
|
||||
outputs:
|
||||
changelog: ${{ steps.changelog.outputs.clean_changelog }}
|
||||
tag: ${{ steps.changelog.outputs.tag }}
|
||||
version: ${{ steps.changelog.outputs.version }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Conventional Changelog Action
|
||||
id: changelog
|
||||
uses: TriPSs/conventional-changelog-action@v3
|
||||
with:
|
||||
version-file: 'version.json'
|
||||
skip-on-empty: 'false'
|
||||
git-message: 'chore(release): :rocket: {version}'
|
||||
|
||||
- name: Output version
|
||||
run: |
|
||||
echo "outputs: ${{ steps.changelog.outputs.tag }}"
|
||||
echo "Version: ${{ steps.changelog.outputs.version }}"
|
||||
echo "log: ${{ steps.changelog.outputs.clean_changelog }}"
|
||||
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ build-ui, versioning ]
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- os: win10-x64
|
||||
format: zip
|
||||
compression: zip
|
||||
- os: win10-x86
|
||||
format: zip
|
||||
compression: zip
|
||||
- os: linux-x64
|
||||
format: tar.gz
|
||||
compression: tar
|
||||
- os: linux-arm
|
||||
format: tar.gz
|
||||
compression: tar
|
||||
- os: linux-arm64
|
||||
compression: tar
|
||||
format: tar.gz
|
||||
- os: osx-x64
|
||||
compression: tar
|
||||
format: tar.gz
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Nuget Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.nuget/packages
|
||||
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-nuget
|
||||
|
||||
- name: Set Backend Version
|
||||
run: |
|
||||
dotnet tool install -g dotnet-setversion
|
||||
setversion -r ${{ needs.versioning.outputs.version }}
|
||||
working-directory: src
|
||||
|
||||
- name: Publish Backend ${{ matrix.os }}
|
||||
run: dotnet publish -c Release -r ${{ matrix.os }} -o "${{ matrix.os }}" --self-contained true -p:PublishSingleFile=true
|
||||
working-directory: src/Ombi
|
||||
|
||||
- name: Download Angular
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: angular_dist
|
||||
path: ~/src/Ombi/dist
|
||||
|
||||
- name: Copy Dist to Artifacts
|
||||
run: |
|
||||
cd ${{ matrix.os }}
|
||||
sudo mkdir -p ClientApp/dist
|
||||
echo "mkdir /ClientApp"
|
||||
echo "list os (ClientApp should be here)"
|
||||
ls
|
||||
cd ..
|
||||
echo "Copy dist to /ClientApp"
|
||||
sudo mv ~/src/Ombi/dist/* ${{ matrix.os }}/ClientApp/dist
|
||||
working-directory: src/Ombi
|
||||
|
||||
- name: Archive Release
|
||||
uses: thedoctor0/zip-release@master
|
||||
with:
|
||||
type: '${{ matrix.compression }}'
|
||||
filename: '../${{ matrix.os }}.${{ matrix.format }}'
|
||||
path: '.'
|
||||
directory: 'src/Ombi/${{ matrix.os }}'
|
||||
|
||||
- name: Publish Release
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ matrix.os }}
|
||||
path: |
|
||||
./src/Ombi/${{ matrix.os }}.${{ matrix.format }}
|
||||
|
||||
release:
|
||||
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-apt:
|
||||
needs: [ release, versioning ]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Trigger APT Build
|
||||
uses: fjogeleit/http-request-action@master
|
||||
with:
|
||||
url: 'https://api.github.com/repos/Ombi-app/Ombi.Apt/actions/workflows/build-deb.yml/dispatches'
|
||||
method: 'POST'
|
||||
contentType: 'application/json'
|
||||
data: '{ "ref":"main", "inputs": { "version": "${{ needs.versioning.outputs.tag }}"} }'
|
||||
customHeaders: '{"Accept":"application/vnd.github.v3+json", "Authorization":"Bearer ${{secrets.APT_PAT}}", "User-Agent":"Ombi"}'
|
||||
|
||||
|
@ -0,0 +1,20 @@
|
||||
name: Contributors
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ develop ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
update-contributors:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Contribute List
|
||||
uses: akhilmhdh/contributors-readme-action@v2.2.1
|
||||
with:
|
||||
commit_message: "chore: :busts_in_silhouette: Updated Contributors [skip ci]"
|
||||
image_size: 50
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
@ -0,0 +1,35 @@
|
||||
name: 'Issue Check'
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
issueCheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Output version
|
||||
run: |
|
||||
echo "log: ${{ github.event.issue.body }}"
|
||||
|
||||
- if: startsWith(github.event.issue.body , '**Describe the bug**') == false
|
||||
name: Close Issue
|
||||
uses: peter-evans/close-issue@v1
|
||||
with:
|
||||
comment: |
|
||||
Hello, Please use the Github template to report an issue. If this is a feature request, please take a look at the readme. <br/> Thanks, <br/> Ombi Bot
|
||||
|
||||
- if: startsWith(github.event.issue.body , '**Describe the bug**') == true
|
||||
name: Create comment
|
||||
uses: peter-evans/create-or-update-comment@v1
|
||||
with:
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
body: |
|
||||
Hi!
|
||||
<br/>Thanks for the issue report. Before a real human comes by, please make sure you used our bug report format.
|
||||
<br/>Have you looked at the wiki yet? https://docs.ombi.app/
|
||||
<br/>Before posting make sure you also read our [FAQ](https://docs.ombi.app/info/faq/).
|
||||
<br/> Make the title describe your issue. Having 'not working' or 'I get this bug' for 100 issues, isn't really helpful.
|
||||
<br/> If we need more information or there is some progress we tag the issue or update the tag and keep you updated.
|
||||
<br/> Thanks!
|
||||
<br/> Ombi Bot.
|
@ -0,0 +1,106 @@
|
||||
name: PR Build
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
jobs:
|
||||
build-ui:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14'
|
||||
|
||||
- name: NodeModules Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
key: node_modules-${{ hashFiles('**/yarn.lock') }}
|
||||
|
||||
- name: UI Install
|
||||
run: yarn --cwd ./src/Ombi/ClientApp install
|
||||
|
||||
- name: Build UI
|
||||
run: yarn --cwd ./src/Ombi/ClientApp run build
|
||||
|
||||
unit-test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: '5.0.x'
|
||||
|
||||
- name: Nuget Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.nuget/packages
|
||||
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-nuget
|
||||
|
||||
- name: Run Unit Tests
|
||||
run: |
|
||||
cd src
|
||||
dotnet test --logger trx --results-directory "TestResults"
|
||||
|
||||
analysis:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
# Disabling shallow clone is recommended for improving relevancy of reporting
|
||||
fetch-depth: 0
|
||||
- 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:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ unit-test ]
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- os: win10-x64
|
||||
format: zip
|
||||
compression: zip
|
||||
- os: win10-x86
|
||||
format: zip
|
||||
compression: zip
|
||||
- os: linux-x64
|
||||
format: tar.gz
|
||||
compression: tar
|
||||
- os: linux-arm
|
||||
format: tar.gz
|
||||
compression: tar
|
||||
- os: linux-arm64
|
||||
compression: tar
|
||||
format: tar.gz
|
||||
- os: osx-x64
|
||||
compression: tar
|
||||
format: tar.gz
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Nuget Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.nuget/packages
|
||||
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-nuget
|
||||
|
||||
- name: Publish Backend ${{ matrix.os }}
|
||||
run: dotnet publish -c Release -r ${{ matrix.os }} -o "${{ matrix.os }}" --self-contained true -p:PublishSingleFile=true
|
||||
working-directory: src/Ombi
|
||||
|
||||
|
||||
|
@ -0,0 +1,50 @@
|
||||
name: Sonar Scanner
|
||||
on:
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
sonarcloud:
|
||||
name: SonarCloud
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
# Shallow clones should be disabled for a better relevancy of analysis
|
||||
fetch-depth: 0
|
||||
|
||||
# Speed-up analysis by caching the scanner workspace
|
||||
- name: Cache SonarCloud workspace
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~\.sonar\cache
|
||||
key: ${{ runner.os }}-sonar-cache
|
||||
restore-keys: ${{ runner.os }}-sonar-cache
|
||||
|
||||
# Speed-up analysis by caching the scanner installation
|
||||
- name: Cache SonarCloud scanner
|
||||
id: cache-sonar-scanner
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: .\.sonar\scanner
|
||||
key: ${{ runner.os }}-sonar-scanner
|
||||
restore-keys: ${{ runner.os }}-sonar-scanner
|
||||
|
||||
- name: Install SonarCloud scanner
|
||||
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
|
||||
shell: powershell
|
||||
# The --version argument is optional. If it is omitted the latest version will be installed.
|
||||
run: |
|
||||
New-Item -Path .\.sonar\scanner -ItemType Directory
|
||||
dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner --version 4.8.0
|
||||
- name: Build
|
||||
shell: powershell
|
||||
env:
|
||||
# Needed to get some information about the pull request, if any
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# The secret referenced in the command-line by SONAR_TOKEN should be generated
|
||||
# from https://sonarcloud.io/account/security/
|
||||
# The organization and project arguments (see /o and /k) are displayed
|
||||
# on the project dashboard in SonarCloud.
|
||||
run: |
|
||||
.\.sonar\scanner\dotnet-sonarscanner begin /k:"Ombi-app_Ombi" /o:"ombi-app" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
|
||||
dotnet build src/Ombi.sln -c NonUiBuild
|
||||
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
|
File diff suppressed because it is too large
Load Diff
@ -1 +0,0 @@
|
||||
next-version: 3.0.0
|
@ -1,15 +0,0 @@
|
||||
# Changelog
|
||||
|
||||
{{#versions}}
|
||||
## {{{label}}}
|
||||
|
||||
{{#sections}}
|
||||
### {{{label}}}
|
||||
|
||||
{{#commits}}
|
||||
- {{{subject}}} [{{{author}}}]
|
||||
|
||||
{{/commits}}
|
||||
{{/sections}}
|
||||
|
||||
{{/versions}}
|
@ -1,3 +1,10 @@
|
||||
|
||||
commit_message: "fix(translations): 🌐 New translations from Crowdin [skip ci]"
|
||||
append_commit_message: false
|
||||
pull_request_title: "🌐 Translations Update"
|
||||
pull_request_labels:
|
||||
- translations
|
||||
|
||||
files:
|
||||
- source: /src/Ombi/wwwroot/translations/en.json
|
||||
translation: /src/Ombi/wwwroot/translations/%two_letters_code%.json
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue