Upload updates file as well

This commit is contained in:
Nikhil Badyal
2024-12-24 13:38:26 +05:30
committed by Nikhil Badyal
parent 7444ef9029
commit 0fe165a09e
4 changed files with 10 additions and 7 deletions
+1 -1
View File
@@ -137,7 +137,7 @@ jobs:
- name: Upload Build Artifact
uses: ncipollo/release-action@main
with:
artifacts: "*-output.apk"
artifacts: "*-output.apk,updates.json,changelog.json,changelog.md"
token: ${{ secrets.GITHUB_TOKEN }}
tag: Build-${{ steps.get-date.outputs.date }}
artifactErrorsFailBuild: true
+3
View File
@@ -118,6 +118,9 @@ jobs:
with:
name: Built-APKs
path: |
changelog.md
changelog.json
updates.json
apks/*-output.apk
apks/VancedMicroG.apk"
if-no-files-found: error
+2 -2
View File
@@ -80,8 +80,8 @@ class APP(object):
a string that represents the output file name for an APK file.
"""
current_date = datetime.now(timezone(time_zone))
formatted_date = current_date.strftime("%Y%b%d_%I%M%p").upper()
return f"Re-{self.app_name}-app-version{slugify(self.app_version)}-{formatted_date}-patch-version-{slugify(self.resource["patches"]["version"])}output.apk"
formatted_date = current_date.strftime("%Y%b%d.%I%M%p").upper()
return f"Re{self.app_name}-Version{slugify(self.app_version)}-PatchVersion{slugify(self.resource["patches"]["version"])}-{formatted_date}-output.apk" # noqa: E501
def __str__(self: "APP") -> str:
"""Returns the str representation of the app."""
+4 -4
View File
@@ -173,16 +173,16 @@ def slugify(string: str) -> str:
modified_string = string.lower()
# Remove special characters
modified_string = re.sub(r"[^\w\s-]", "-", modified_string)
modified_string = re.sub(r"[^\w\s-]", ".", modified_string)
# Replace spaces with dashes
modified_string = re.sub(r"\s+", "-", modified_string)
modified_string = re.sub(r"\s+", ".", modified_string)
# Remove consecutive dashes
modified_string = re.sub(r"-+", "-", modified_string)
modified_string = re.sub(r"-+", ".", modified_string)
# Remove leading and trailing dashes
return modified_string.strip("-")
return modified_string.strip(".")
def _check_version(output: str) -> None: