This commit is contained in:
@@ -35,13 +35,14 @@ jobs:
|
|||||||
id: extract_version
|
id: extract_version
|
||||||
run: |
|
run: |
|
||||||
VERSION=$(grep -oP 'versionName\s+"[^"]+"' app/build.gradle | head -n1 | cut -d'"' -f2 | tr -d '\r\n')
|
VERSION=$(grep -oP 'versionName\s+"[^"]+"' app/build.gradle | head -n1 | cut -d'"' -f2 | tr -d '\r\n')
|
||||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||||
echo "Detected version: $VERSION"
|
echo "Detected version: $VERSION"
|
||||||
|
|
||||||
# ------------------- Stop if already released -------------------
|
# ------------------- Stop if already released -------------------
|
||||||
- name: Stop if version already released
|
- name: Stop if version already released
|
||||||
id: stop
|
id: stop
|
||||||
run: |
|
run: |
|
||||||
|
VERSION=${{ steps.extract_version.outputs.version }}
|
||||||
if git show-ref --tags --quiet --verify "refs/tags/$VERSION"; then
|
if git show-ref --tags --quiet --verify "refs/tags/$VERSION"; then
|
||||||
echo "Version $VERSION already released, stopping job."
|
echo "Version $VERSION already released, stopping job."
|
||||||
echo "CONTINUE=false" >> $GITHUB_ENV
|
echo "CONTINUE=false" >> $GITHUB_ENV
|
||||||
@@ -89,10 +90,10 @@ jobs:
|
|||||||
server_url: https://git.daemonlord.ru
|
server_url: https://git.daemonlord.ru
|
||||||
repository: ${{ gitea.repository }}
|
repository: ${{ gitea.repository }}
|
||||||
token: ${{ secrets.API_TOKEN }}
|
token: ${{ secrets.API_TOKEN }}
|
||||||
tag_name: $VERSION
|
tag_name: ${{ steps.extract_version.outputs.version }}
|
||||||
name: Release $VERSION
|
name: Release ${{ steps.extract_version.outputs.version }}
|
||||||
body: |
|
body: |
|
||||||
Android release $VERSION
|
Android release ${{ steps.extract_version.outputs.version }}
|
||||||
files: |
|
files: |
|
||||||
app/build/outputs/apk/release/*.apk
|
app/build/outputs/apk/release/*.apk
|
||||||
|
|
||||||
@@ -101,7 +102,7 @@ jobs:
|
|||||||
if: env.CONTINUE == 'true'
|
if: env.CONTINUE == 'true'
|
||||||
run: |
|
run: |
|
||||||
LICENSE="MIT"
|
LICENSE="MIT"
|
||||||
mkdir -p fdroid-repo/repo fdroid-repo/metadata
|
mkdir -p fdroid-repo/repo fdroid-repo/metadata fdroid-repo/icons
|
||||||
echo "${{ secrets.FDROID_KEYSTORE_BASE64 }}" | base64 -d > fdroid-repo/keystore.jks
|
echo "${{ secrets.FDROID_KEYSTORE_BASE64 }}" | base64 -d > fdroid-repo/keystore.jks
|
||||||
for apk in app/build/outputs/apk/release/*.apk; do
|
for apk in app/build/outputs/apk/release/*.apk; do
|
||||||
APPID=$(grep 'applicationId' app/build.gradle | awk -F '"' '{print $2}')
|
APPID=$(grep 'applicationId' app/build.gradle | awk -F '"' '{print $2}')
|
||||||
|
|||||||
Reference in New Issue
Block a user