Skip to content

Commit f5be37f

Browse files
committed
Updated WorkFlow
1 parent 6ebc09c commit f5be37f

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

.github/scripts/compute-release-tag.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@
99

1010
API_ENDPOINT_UOA="https://api.github.com/repos/RandomCoderOrg/ubuntu-on-android/releases"
1111
resp_uoa = requests.get(API_ENDPOINT_UOA, headers=headers)
12-
Json_data2 = json.loads(resp_uoa.text)
12+
Json_data_uoa = json.loads(resp_uoa.text)
1313

1414
# uV = ["v3.1-alpha"][0] # For testing
15-
udroid_version = Json_data2[0]['tag_name'].replace("v","")
15+
udroid_version = Json_data_uoa[0]['tag_name'].replace("v","")
1616

1717
API_ENDPOINT_UA="https://api.github.com/repos/RandomCoderOrg/udroid-download/releases"
1818
resp_ud = requests.get(API_ENDPOINT_UA, headers=headers)
19-
Json_data = json.loads(resp_ud.text)
19+
Json_data_ua = json.loads(resp_ud.text)
2020

2121

22-
match = re.compile(r'V(\d+)(\D+)(\d+)').findall(Json_data[0]['tag_name'])
22+
match = re.compile(r'V(\d+)(\D+)(\d+)').findall(Json_data_ua[0]['tag_name'])
2323
_, RELEASE_TYPE, IterationNumber = match[0]
2424
IterationNumber = int(IterationNumber) + 1
2525

.github/workflows/anchor-build-and-release.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,9 @@ jobs:
4141
name: raw-tarballs
4242
- name: Compute release tag
4343
run: |
44-
udroid_version=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' \
45-
https://github.com/RandomCoderOrg/ubuntu-on-android \
46-
| tail -n1 | cut -d / -f 3 | cut -d v -f 2- )
47-
udroid_download=$(
48-
git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' \
49-
https://github.com/RandomCoderOrg/udroid-download \
50-
| tail -n1 | cut -d / -f 3
51-
)
52-
echo "VERSIONTAG=V${udroid_version}${BUILD_TYPE}PR$((${udroid_download: -2} + 1))" >> $GITHUB_ENV
44+
pip3 install requests
45+
sudo python3 /home/runner/work/udroid-download/udroid-download/.github/scripts/compute-release-tag.py
46+
5347
- name: Generate release notes
5448
run: sudo bash /home/runner/work/udroid-download/udroid-download/.github/scripts/generate-release-notes.sh
5549
- name: Create Release

0 commit comments

Comments
 (0)