Fix release.py
Browse files- .github/workflows/release.yml +10 -0
- Dockerfile +1 -1
- api/versions.py +1 -1
.github/workflows/release.yml
CHANGED
@@ -63,6 +63,16 @@ jobs:
|
|
63 |
fi
|
64 |
fi
|
65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
- name: Set up QEMU
|
67 |
uses: docker/setup-qemu-action@v3
|
68 |
|
|
|
63 |
fi
|
64 |
fi
|
65 |
|
66 |
+
- name: Create or overwrite a release
|
67 |
+
# https://github.com/actions/upload-release-asset has been replaced by https://github.com/softprops/action-gh-release
|
68 |
+
uses: softprops/action-gh-release@v2
|
69 |
+
with:
|
70 |
+
token: ${{ secrets.MY_GITHUB_TOKEN }} # Use the secret as an environment variable
|
71 |
+
prerelease: ${{ env.PRERELEASE }}
|
72 |
+
tag_name: ${{ env.RELEASE_TAG }}
|
73 |
+
# The body field does not support environment variable substitution directly.
|
74 |
+
body_path: release_body.md
|
75 |
+
|
76 |
- name: Set up QEMU
|
77 |
uses: docker/setup-qemu-action@v3
|
78 |
|
Dockerfile
CHANGED
@@ -120,7 +120,7 @@ RUN --mount=type=cache,id=ragflow_npm,target=/root/.npm,sharing=locked \
|
|
120 |
|
121 |
COPY .git /ragflow/.git
|
122 |
|
123 |
-
RUN version_info=$(git describe --tags --match=v* --dirty); \
|
124 |
if [ "$LIGHTEN" == "1" ]; then \
|
125 |
version_info="$version_info slim"; \
|
126 |
else \
|
|
|
120 |
|
121 |
COPY .git /ragflow/.git
|
122 |
|
123 |
+
RUN version_info=$(git describe --tags --match=v* --dirty --always); \
|
124 |
if [ "$LIGHTEN" == "1" ]; then \
|
125 |
version_info="$version_info slim"; \
|
126 |
else \
|
api/versions.py
CHANGED
@@ -43,7 +43,7 @@ def get_closest_tag_and_count():
|
|
43 |
try:
|
44 |
# Get the current commit hash
|
45 |
version_info = (
|
46 |
-
subprocess.check_output(["git", "describe", "--tags", "--match=v*", "--dirty"])
|
47 |
.strip()
|
48 |
.decode("utf-8")
|
49 |
)
|
|
|
43 |
try:
|
44 |
# Get the current commit hash
|
45 |
version_info = (
|
46 |
+
subprocess.check_output(["git", "describe", "--tags", "--match=v*", "--dirty", "--always"])
|
47 |
.strip()
|
48 |
.decode("utf-8")
|
49 |
)
|