Workflow updates (#658)

# Added
- Added: Added automatic character parsing for discord notifier. Now if the PR is over a certain character limit, it will trim and add an appropriate link to the full changelog. (Release for Stable, PR for Dev)

# Removed
- Removed: Removed Sentry map task from the workflow since Sentry is no longer used.
This commit is contained in:
Robbie Davis 2021-10-12 11:28:09 -04:00 committed by GitHub
parent 634b6d5cb0
commit c3868d6575
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 77 deletions

View File

@ -1,63 +0,0 @@
name: Sentry Map Release
on:
workflow_dispatch:
inputs:
version:
description: "version to update package.json"
required: true
# No default
jobs:
build:
name: Setup Sentry CLI
runs-on: ubuntu-latest
steps:
- uses: mathieu-bour/setup-sentry-cli@1.2.0
with:
version: latest
token: ${{ secrets.SENTRY_TOKEN }}
organization: kavita-7n
project: angular
- name: Check out repository
uses: actions/checkout@v2
- name: Parse Version
run: |
version='${{ github.event.inputs.version }}'
newVersion=${version%.*}
echo $newVersion
echo "::set-output name=VERSION::$newVersion"
id: parse-version
- name: NodeJS to Compile WebUI
uses: actions/setup-node@v2.1.5
with:
node-version: '14'
- run: |
cd UI/Web || exit
echo 'Installing web dependencies'
npm install
npm version --allow-same-version "${{ steps.parse-version.outputs.VERSION }}"
echo 'Building UI'
npm run prod
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Create Release
run: sentry-cli releases new ${{ steps.parse-version.outputs.VERSION }}
- name: Upload Source Maps
run: sentry-cli releases files ${{ steps.parse-version.outputs.VERSION }} upload-sourcemaps UI/Web/dist
- name: Finalize Release
run: sentry-cli releases finalize ${{ steps.parse-version.outputs.VERSION }}

View File

@ -136,6 +136,13 @@ jobs:
id: parse-body
run: |
body="${{ steps.findPr.outputs.body }}"
if [[ ${#body} -gt 1870 ]] ; then
body=${body:0:1870}
body="${body}...and much more.
Read full changelog: https://github.com/Kareadita/Kavita/pull/${{ steps.findPr.outputs.pr }}"
fi
body=${body//\'/}
body=${body//'%'/'%25'}
body=${body//$'\n'/'%0A'}
@ -180,13 +187,6 @@ jobs:
dotnet-version: '5.0.x'
- run: ./monorepo-build.sh
- name: Trigger Sentry workflow
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Sentry Map Release
token: ${{ secrets.REPO_GHA_PAT }}
inputs: '{ "version": "${{steps.get-version.outputs.assembly-version}}" }'
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
@ -238,6 +238,13 @@ jobs:
id: parse-body
run: |
body="${{ steps.findPr.outputs.body }}"
if [[ ${#body} -gt 1870 ]] ; then
body=${body:0:1870}
body="${body}...and much more.
Read full changelog: https://github.com/Kareadita/Kavita/releases/latest"
fi
body=${body//\'/}
body=${body//'%'/'%25'}
body=${body//$'\n'/'%0A'}
@ -291,13 +298,6 @@ jobs:
dotnet-version: '5.0.x'
- run: ./monorepo-build.sh
- name: Trigger Sentry workflow
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Sentry Map Release
token: ${{ secrets.REPO_GHA_PAT }}
inputs: '{ "version": "${{steps.get-version.outputs.assembly-version}}" }'
- name: Login to Docker Hub
uses: docker/login-action@v1
with: