Skip to content

Commit ceafc90

Browse files
committed
Updated actions
1 parent fa052cf commit ceafc90

File tree

4 files changed

+45
-8
lines changed

4 files changed

+45
-8
lines changed

.github/workflows/main.yml

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
name: Main
32

43
on:
@@ -14,7 +13,7 @@ on:
1413

1514
jobs:
1615
ShellCheck:
17-
runs-on: ubuntu-22.04
16+
runs-on: ubuntu-latest
1817

1918
steps:
2019
- name: Git checkout
@@ -27,7 +26,7 @@ jobs:
2726

2827
TestBuild:
2928
needs: ShellCheck
30-
runs-on: ubuntu-22.04
29+
runs-on: ubuntu-latest
3130

3231
steps:
3332
- name: Git checkout
@@ -54,7 +53,7 @@ jobs:
5453

5554
Sign:
5655
needs: TestBuild
57-
runs-on: ubuntu-22.04
56+
runs-on: ubuntu-latest
5857

5958
steps:
6059
- name: Git checkout
@@ -80,3 +79,40 @@ jobs:
8079
git config --global user.name "github-actions[bot]"
8180
git commit -m "Updated signature" -a || echo "No changes to commit"
8281
git push
82+
83+
CreateRelease:
84+
needs: Sign
85+
runs-on: ubuntu-latest
86+
87+
steps:
88+
- name: Git checkout
89+
uses: actions/checkout@v3
90+
91+
- name: Check if version differs
92+
id: version-check
93+
run: |
94+
LATEST_VERSION=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases/latest -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" | jq -r .tag_name)
95+
THIS_VERSION=$(grep -oP 'Version\s*:\s*\K[0-9.]+' imei.sh)
96+
echo "Latest version: $LATEST_VERSION"
97+
echo "This version: $THIS_VERSION"
98+
if [[ "$LATEST_VERSION" != "$THIS_VERSION" ]]; then
99+
echo "RELEASE_NEEDED=true" >> $GITHUB_OUTPUT
100+
echo "LATEST_VERSION=$LATEST_VERSION" >> $GITHUB_OUTPUT
101+
echo "THIS_VERSION=$THIS_VERSION" >> $GITHUB_OUTPUT
102+
else
103+
echo "RELEASE_NEEDED=false" >> $GITHUB_OUTPUT
104+
fi
105+
106+
- name: Create Release
107+
id: create-release
108+
if: steps.version-check.outputs.RELEASE_NEEDED == 'true'
109+
run: |
110+
LATEST_VERSION="${{ steps.version-check.outputs.LATEST_VERSION }}"
111+
THIS_VERSION="${{ steps.version-check.outputs.THIS_VERSION }}"
112+
RELEASE_BODY="**Full Changelog**: https://github.com/${{ github.repository }}/compare/$LATEST_VERSION...$THIS_VERSION"
113+
echo "Creating release $THIS_VERSION..."
114+
echo "Tagging commit..."
115+
git tag $THIS_VERSION
116+
git push --tag
117+
echo "Creating release..."
118+
response=$(curl -s --data "{\"tag_name\": \"$THIS_VERSION\", \"name\": \"$THIS_VERSION\", \"body\": \"$RELEASE_BODY\"}" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${{ github.repository }}/releases")

.github/workflows/update-version-info.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@ on:
1414

1515
jobs:
1616
Update:
17-
runs-on: ubuntu-22.04
17+
runs-on: ubuntu-latest
1818

1919
steps:
2020
- name: Git checkout
2121
uses: actions/checkout@v3
2222

2323
- name: Update Version Information
24-
run: sudo bash update_version_info.sh -- && echo "OK"
24+
run: |-
25+
sudo bash update_version_info.sh -- && echo "OK"
2526
2627
- name: Commit and push on changes
2728
run: |-

imei.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
# including advanced delegate support. #
77
# #
88
# Author : Sascha Greuel <[email protected]> #
9-
# Date : 2023-09-13 22:27 #
9+
# Date : 2023-09-13 23:33 #
1010
# License : ISC #
11-
# Version : 6.10.2 #
11+
# Version : 6.10.3 #
1212
# #
1313
# Usage : bash ./imei.sh #
1414
##############################################################

imei.sh.sig

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)