aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLASER-Yi <[email protected]>2021-03-31 01:20:26 +0800
committerLASER-Yi <[email protected]>2021-03-31 01:20:26 +0800
commite88c94ccd2d9a26c6562bd62c8182013155a56b4 (patch)
tree14b5e1ec98c5ec6792b049bf5e24cedd95a9dc5f
parent535c32ba91b6b51d355153593faa4012e697b32d (diff)
downloadbazarr-e88c94ccd2d9a26c6562bd62c8182013155a56b4.tar.gz
bazarr-e88c94ccd2d9a26c6562bd62c8182013155a56b4.zip
no log: Add a step to build standalone version in action and upload to asset
-rw-r--r--.github/files_to_copy7
-rwxr-xr-x.github/scripts/create_asset.sh25
-rw-r--r--.github/workflows/release_beta_to_dev.yaml8
-rw-r--r--.release-it.json6
4 files changed, 40 insertions, 6 deletions
diff --git a/.github/files_to_copy b/.github/files_to_copy
new file mode 100644
index 000000000..0e914a872
--- /dev/null
+++ b/.github/files_to_copy
@@ -0,0 +1,7 @@
+bazarr
+frontend/build
+libs
+___init__.py
+bazarr.py
+requirements.txt
+VERSION \ No newline at end of file
diff --git a/.github/scripts/create_asset.sh b/.github/scripts/create_asset.sh
new file mode 100755
index 000000000..3611c597a
--- /dev/null
+++ b/.github/scripts/create_asset.sh
@@ -0,0 +1,25 @@
+#! /bin/bash
+# This script is used in release-it as hook
+# Change how this script is triggered by editing .release-it.json
+# NOTE: Please make sure working directory is in root of repo
+# NOTE: This script is only working on linux
+
+set -e
+
+# Get version from tag
+git describe --abbrev=0 > VERSION
+
+# Copy files based on files_to_copy
+to_dist=__builds__/bazarr
+mkdir -p $to_dist
+file_list=$(cat .github/files_to_copy)
+for f in $file_list
+do
+ echo "**** copying $f to release ****"
+ cp -r --parents $f $to_dist
+done
+
+pushd __builds__/bazarr
+zip -r ../bazarr.zip . -x '*.map' -b $(mktemp -d)
+popd
+rm -rf $to_dist \ No newline at end of file
diff --git a/.github/workflows/release_beta_to_dev.yaml b/.github/workflows/release_beta_to_dev.yaml
index 2883f6d43..0f8c84274 100644
--- a/.github/workflows/release_beta_to_dev.yaml
+++ b/.github/workflows/release_beta_to_dev.yaml
@@ -41,6 +41,7 @@ jobs:
- name: Install Global Tools
run: npm install -g release-it @release-it/bumper auto-changelog
+ # TODO: Remove @release-it/bumper
- name: Install UI Dependencies
run: npm install
@@ -49,12 +50,7 @@ jobs:
- name: Build & Stage UI
run: npm run build && git add .
working-directory: ${{ env.UI_DIRECTORY }}
-
- - name: Save UI to Asset
- run: |
- mkdir -p ../.${{ env.ASSET_DIRECTORY }} &&
- zip -r ../.${{ env.ASSET_DIRECTORY }}/ui.zip ./ -x '*.map' -b $(mktemp -d)
- working-directory: ${{ env.UI_DIRECTORY }}/build
+ # TODO: Remove Stage Step
- name: Create Release
run: release-it --ci --increment prerelease --preRelease=beta
diff --git a/.release-it.json b/.release-it.json
index 988214820..bf6dbde6c 100644
--- a/.release-it.json
+++ b/.release-it.json
@@ -13,6 +13,12 @@
"publish": false,
"ignoreVersion": true
},
+ "hooks": {
+ "after:git:release": [
+ "chmod +x .github/scripts/*",
+ ".github/scripts/create_asset.sh"
+ ]
+ },
"plugins": {
"@release-it/bumper": {
"in": {