Fix issues on release_beta_to_dev and bring back CI

pull/1348/head
LASER-Yi 4 years ago
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: on:
push: push:
branches: [frontend-upgrade] branches: [development]
pull_request: pull_request:
branches: [frontend-upgrade] branches: [development]
jobs: jobs:
Frontend: Frontend:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
working-directory: ./frontend UI_DIRECTORY: ./frontend
strategy: strategy:
matrix: matrix:
@ -20,6 +20,13 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 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 }} - name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
@ -27,8 +34,13 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: npm install run: npm install
working-directory: ${{ env.working-directory }} working-directory: ${{ env.UI_DIRECTORY }}
- name: Build - name: Build
run: npm run 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: Release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
working-directory: ./frontend UI_DIRECTORY: ./frontend
FETCH_DEPTH: 15 # Should be enough
steps: steps:
- name: Checkout source code - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
fetch-depth: 0 fetch-depth: ${{ env.FETCH_DEPTH }}
ref: development 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 - name: Setup NodeJS
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: "15.x" 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: Remove previous build directory
uses: JesseTG/rm@v1.0.2
with:
path: ${{ env.working-directory }}/build
- name: Build
run: npm --prefix ${{ env.working-directory }} run build
- uses: stefanzweifel/git-auto-commit-action@v4 - name: Install Global Tools
with: run: npm install -g release-it @release-it/bumper auto-changelog
commit_message: Release commit build
- id: latest_release - name: Install UI Dependencies
uses: pozetroninc/github-action-get-latest-release@master run: npm install
with: working-directory: ${{ env.UI_DIRECTORY }}
repository: ${{ github.repository }}
excludes: draft
- name: Define LAST_VERSION environment variable - name: Build & Stage UI
run: | run: npm run build && git add .
echo "LAST_VERSION=${{steps.latest_release.outputs.release}}" >> $GITHUB_ENV working-directory: ${{ env.UI_DIRECTORY }}
- name: Update version and create release - name: Create Release
uses: TheRealWaldo/release-it@v0.2.1 run: release-it --ci --increment prerelease --preRelease=beta
with:
json-opts: '{"preRelease": true, "increment": "prepatch", "preReleaseId": "beta"}'

4
.gitignore vendored

@ -11,6 +11,9 @@ bazarr.pid
/bin /bin
/.vscode /.vscode
/package.json
/package-lock.json
# Allow # Allow
!*.dll !*.dll
@ -20,3 +23,4 @@ frontend/dist
frontend/*.local frontend/*.local
frontend/.eslintcache frontend/.eslintcache
frontend/.idea/* frontend/.idea/*
frontend/**/*.map

@ -1,8 +1,11 @@
{ {
"git": {
"requireCleanWorkingDir": false,
"changelog": "auto-changelog --stdout"
},
"github": { "github": {
"release": true, "release": true,
"releaseName": "v${version}", "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"
}, },
"npm": { "npm": {
"publish": false, "publish": false,

@ -1,6 +1,8 @@
From newest to oldest: From newest to oldest:
{{#each releases}} {{#each releases}}
{{#if @first}}
{{#each commits}} {{#each commits}}
- {{subject}}{{#if href}} [`{{shorthash}}`]({{href}}){{/if}} - {{subject}}{{#if href}} [{{shorthash}}]({{href}}){{/if}}
{{/each}} {{/each}}
{{/if}}
{{/each}} {{/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

5987
package-lock.json generated

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…
Cancel
Save