mirror of https://github.com/morpheus65535/bazarr
Fix issues on release_beta_to_dev and bring back CI
This commit is contained in:
parent
75de2c7759
commit
e0779cb3c1
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"template": "./changelog.hbs",
|
||||
"unreleased": true,
|
||||
"commitLimit": true,
|
||||
"ignoreCommitPattern": "^Release.*",
|
||||
"sortCommits": "date-desc"
|
||||
}
|
|
@ -2,15 +2,15 @@ name: CI
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: [frontend-upgrade]
|
||||
branches: [development]
|
||||
pull_request:
|
||||
branches: [frontend-upgrade]
|
||||
branches: [development]
|
||||
|
||||
jobs:
|
||||
Frontend:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
working-directory: ./frontend
|
||||
UI_DIRECTORY: ./frontend
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
|
@ -20,6 +20,13 @@ jobs:
|
|||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: '${{ env.UI_DIRECTORY }}/node_modules'
|
||||
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: ${{ runner.os }}-modules-
|
||||
|
||||
- name: Set up Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
|
@ -27,8 +34,13 @@ jobs:
|
|||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
working-directory: ${{ env.working-directory }}
|
||||
working-directory: ${{ env.UI_DIRECTORY }}
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
working-directory: ${{ env.working-directory }}
|
||||
working-directory: ${{ env.UI_DIRECTORY }}
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: "ui"
|
||||
path: "${{ env.UI_DIRECTORY }}/frontend/build"
|
||||
|
|
|
@ -7,49 +7,43 @@ jobs:
|
|||
Release:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
|
||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
working-directory: ./frontend
|
||||
UI_DIRECTORY: ./frontend
|
||||
FETCH_DEPTH: 15 # Should be enough
|
||||
steps:
|
||||
- name: Checkout source code
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-depth: ${{ env.FETCH_DEPTH }}
|
||||
ref: development
|
||||
|
||||
- name: Setup Git
|
||||
run: |
|
||||
git config --global user.name "github-actions" &&
|
||||
git fetch --depth ${{ env.FETCH_DEPTH }} --tags
|
||||
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: '${{ env.UI_DIRECTORY }}/node_modules'
|
||||
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: ${{ runner.os }}-modules-
|
||||
|
||||
- name: Setup NodeJS
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: "15.x"
|
||||
- run: npm install -D release-it
|
||||
- run: npm install -D @release-it/bumper
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm --prefix ${{ env.working-directory }} install
|
||||
- name: Install Global Tools
|
||||
run: npm install -g release-it @release-it/bumper auto-changelog
|
||||
|
||||
- name: Remove previous build directory
|
||||
uses: JesseTG/rm@v1.0.2
|
||||
with:
|
||||
path: ${{ env.working-directory }}/build
|
||||
- name: Install UI Dependencies
|
||||
run: npm install
|
||||
working-directory: ${{ env.UI_DIRECTORY }}
|
||||
|
||||
- name: Build
|
||||
run: npm --prefix ${{ env.working-directory }} run build
|
||||
- name: Build & Stage UI
|
||||
run: npm run build && git add .
|
||||
working-directory: ${{ env.UI_DIRECTORY }}
|
||||
|
||||
- uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: Release commit build
|
||||
|
||||
- id: latest_release
|
||||
uses: pozetroninc/github-action-get-latest-release@master
|
||||
with:
|
||||
repository: ${{ github.repository }}
|
||||
excludes: draft
|
||||
|
||||
- name: Define LAST_VERSION environment variable
|
||||
run: |
|
||||
echo "LAST_VERSION=${{steps.latest_release.outputs.release}}" >> $GITHUB_ENV
|
||||
|
||||
- name: Update version and create release
|
||||
uses: TheRealWaldo/release-it@v0.2.1
|
||||
with:
|
||||
json-opts: '{"preRelease": true, "increment": "prepatch", "preReleaseId": "beta"}'
|
||||
- name: Create Release
|
||||
run: release-it --ci --increment prerelease --preRelease=beta
|
||||
|
|
|
@ -11,6 +11,9 @@ bazarr.pid
|
|||
/bin
|
||||
/.vscode
|
||||
|
||||
/package.json
|
||||
/package-lock.json
|
||||
|
||||
# Allow
|
||||
!*.dll
|
||||
|
||||
|
@ -20,3 +23,4 @@ frontend/dist
|
|||
frontend/*.local
|
||||
frontend/.eslintcache
|
||||
frontend/.idea/*
|
||||
frontend/**/*.map
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
{
|
||||
"git": {
|
||||
"requireCleanWorkingDir": false,
|
||||
"changelog": "auto-changelog --stdout"
|
||||
},
|
||||
"github": {
|
||||
"release": true,
|
||||
"releaseName": "v${version}",
|
||||
"releaseNotes": "echo \"From newest to oldest:\" && git log --pretty=format:\"- %s [%h](${repo.protocol}://${repo.host}/${repo.owner}/${repo.project}/commit/%H)\" --no-merges --grep \"^Release\" --invert-grep $LAST_VERSION..HEAD"
|
||||
"releaseName": "v${version}"
|
||||
},
|
||||
"npm": {
|
||||
"publish": false,
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
From newest to oldest:
|
||||
{{#each releases}}
|
||||
{{#each commits}}
|
||||
- {{subject}}{{#if href}} [`{{shorthash}}`]({{href}}){{/if}}
|
||||
{{/each}}
|
||||
{{#if @first}}
|
||||
{{#each commits}}
|
||||
- {{subject}}{{#if href}} [{{shorthash}}]({{href}}){{/if}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
{{/each}}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"devDependencies": {
|
||||
"@release-it/bumper": "^2.0.0",
|
||||
"release-it": "^14.5.0"
|
||||
},
|
||||
"version": "0.9.4-beta.7"
|
||||
}
|
Loading…
Reference in New Issue