|
|
@ -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
|
|
|
|
# versioning:
|
|
|
|
- name: Conventional Changelog Action
|
|
|
|
# runs-on: ubuntu-latest
|
|
|
|
id: changelog
|
|
|
|
# steps:
|
|
|
|
uses: TriPSs/conventional-changelog-action@v3
|
|
|
|
# - uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
# # This is only to get the next version number so we can set the version before compile
|
|
|
|
skip-version-file: 'true'
|
|
|
|
# - name: Conventional Changelog Action
|
|
|
|
skip-commit: 'true'
|
|
|
|
# id: changelog
|
|
|
|
version-file: 'version.json'
|
|
|
|
# uses: TriPSs/conventional-changelog-action@v3
|
|
|
|
output-file: 'false'
|
|
|
|
# with:
|
|
|
|
skip-on-empty: 'false'
|
|
|
|
# github-token: ${{ secrets.github_token }}
|
|
|
|
git-push: 'false'
|
|
|
|
# skip-version-file: 'true'
|
|
|
|
|
|
|
|
# skip-commit: 'true'
|
|
|
|
|
|
|
|
# version-file: 'version.json'
|
|
|
|
|
|
|
|
# output-file: 'false'
|
|
|
|
|
|
|
|
# skip-on-empty: 'false'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# - name: Output version
|
|
|
|
- name: Output version
|
|
|
|
# run: |
|
|
|
|
run: |
|
|
|
|
# echo "outputs: ${{ steps.changelog.outputs.tag }}"
|
|
|
|
echo "outputs: ${{ steps.changelog.outputs.tag }}"
|
|
|
|
# echo "Version: ${{ steps.changelog.outputs.version }}"
|
|
|
|
echo "Version: ${{ steps.changelog.outputs.version }}"
|
|
|
|
# echo "log: ${{ steps.changelog.outputs.clean_changelog }}"
|
|
|
|
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,48 +170,56 @@ 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
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Conventional Changelog Action
|
|
|
|
|
|
|
|
id: changelog
|
|
|
|
|
|
|
|
uses: TriPSs/conventional-changelog-action@v3
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
github-token: ${{ secrets.github_token }}
|
|
|
|
|
|
|
|
git-message: 'chore(release): {version}'
|
|
|
|
|
|
|
|
version-file: 'version.json'
|
|
|
|
|
|
|
|
output-file: 'CHANGELOG.md'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Download Artifacts
|
|
|
|
- name: Download Artifacts
|
|
|
|
id: download
|
|
|
|
id: download
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
with:
|
|
|
|
path: artifacts
|
|
|
|
path: artifacts
|
|
|
|
|
|
|
|
|
|
|
|
- name: Publish to GitHub
|
|
|
|
- name: Publish to GitHub Master
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
if: contains(github.ref, 'master')
|
|
|
|
with:
|
|
|
|
with:
|
|
|
|
body: ${{ steps.changelog.outputs.clean_changelog }}
|
|
|
|
body: ${{ needs.versioning.outputs.changelog }}
|
|
|
|
draft: 'true'
|
|
|
|
name: ${{ needs.versioning.outputs.tag }}
|
|
|
|
name: ${{ steps.changelog.outputs.tag }}
|
|
|
|
tag_name: ${{ needs.versioning.outputs.tag }}
|
|
|
|
tag_name: ${{ steps.changelog.outputs.tag }}
|
|
|
|
|
|
|
|
files: |
|
|
|
|
files: |
|
|
|
|
artifacts/**/*.tar.gz
|
|
|
|
artifacts/**/*.tar.gz
|
|
|
|
artifacts/**/*.zip
|
|
|
|
artifacts/**/*.zip
|
|
|
|
|
|
|
|
|
|
|
|
# - name: Publish to GitHub
|
|
|
|
- name: Publish to GitHub Develop
|
|
|
|
# uses: softprops/action-gh-release@v1
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
# # if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
if: contains(github.ref, 'develop')
|
|
|
|
# with:
|
|
|
|
with:
|
|
|
|
# body: 'Test'
|
|
|
|
prerelease: true
|
|
|
|
# draft: 'true'
|
|
|
|
body: ${{ needs.versioning.outputs.changelog }}
|
|
|
|
# name: 'Test'
|
|
|
|
name: ${{ needs.versioning.outputs.tag }}
|
|
|
|
# files: |
|
|
|
|
tag_name: ${{ needs.versioning.outputs.tag }}
|
|
|
|
# artifacts/**/*.tar.gz
|
|
|
|
files: |
|
|
|
|
# artifacts/**/*.zip
|
|
|
|
artifacts/**/*.tar.gz
|
|
|
|
|
|
|
|
artifacts/**/*.zip
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
update-changelog:
|
|
|
|
|
|
|
|
needs: [ release ]
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
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}'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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:
|
|
|
|