summaryrefslogtreecommitdiffhomepage
path: root/.github/workflows
diff options
context:
space:
mode:
authorLASER-Yi <[email protected]>2021-03-27 13:48:12 +0800
committerLASER-Yi <[email protected]>2021-03-27 13:48:12 +0800
commite0779cb3c13ee8214be2f47de16a776d50287d21 (patch)
treeab4944279c9480741950e3d8336b2a10d101fecf /.github/workflows
parent75de2c7759b699f7c708044c459653edd04a1862 (diff)
downloadbazarr-e0779cb3c13ee8214be2f47de16a776d50287d21.tar.gz
bazarr-e0779cb3c13ee8214be2f47de16a776d50287d21.zip
Fix issues on release_beta_to_dev and bring back CI
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/ci.yml22
-rw-r--r--.github/workflows/release_beta_to_dev.yaml58
2 files changed, 43 insertions, 37 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3cbcc368a..e3728ebe4 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -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"
diff --git a/.github/workflows/release_beta_to_dev.yaml b/.github/workflows/release_beta_to_dev.yaml
index 3ef91b13e..ae49a4e5c 100644
--- a/.github/workflows/release_beta_to_dev.yaml
+++ b/.github/workflows/release_beta_to_dev.yaml
@@ -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: Remove previous build directory
- uses: JesseTG/[email protected]
- with:
- path: ${{ env.working-directory }}/build
-
- - name: Build
- run: npm --prefix ${{ env.working-directory }} run build
- - uses: stefanzweifel/git-auto-commit-action@v4
- with:
- commit_message: Release commit build
+ - name: Install Global Tools
+ run: npm install -g release-it @release-it/bumper auto-changelog
- - id: latest_release
- uses: pozetroninc/github-action-get-latest-release@master
- with:
- repository: ${{ github.repository }}
- excludes: draft
+ - name: Install UI Dependencies
+ run: npm install
+ working-directory: ${{ env.UI_DIRECTORY }}
- - name: Define LAST_VERSION environment variable
- run: |
- echo "LAST_VERSION=${{steps.latest_release.outputs.release}}" >> $GITHUB_ENV
+ - name: Build & Stage UI
+ run: npm run build && git add .
+ working-directory: ${{ env.UI_DIRECTORY }}
- - name: Update version and create release
- uses: TheRealWaldo/[email protected]
- with:
- json-opts: '{"preRelease": true, "increment": "prepatch", "preReleaseId": "beta"}'
+ - name: Create Release
+ run: release-it --ci --increment prerelease --preRelease=beta