Update .forgejo/workflows/release.yaml
Some checks failed
Android Release Build / build (push) Failing after 6s
Some checks failed
Android Release Build / build (push) Failing after 6s
This commit is contained in:
parent
6c80885be2
commit
92d8b826b4
1 changed files with 10 additions and 2 deletions
|
@ -44,6 +44,10 @@ jobs:
|
|||
RAW_VERSION=$(grep versionName app/build.gradle | sed -E 's/.*versionName[[:space:]]+"([^"]+)".*/\1/')
|
||||
CLEAN_VERSION=${RAW_VERSION#v}
|
||||
VERSION_NAME="v$CLEAN_VERSION"
|
||||
|
||||
echo "$VERSION_NAME" > version.txt
|
||||
echo "✅ Detected version: $VERSION_NAME"
|
||||
|
||||
echo "VERSION_NAME=$VERSION_NAME" >> "$GITHUB_ENV"
|
||||
echo "TAG_NAME=$VERSION_NAME" >> "$GITHUB_ENV"
|
||||
|
||||
|
@ -68,6 +72,9 @@ jobs:
|
|||
|
||||
- name: Create Forgejo release
|
||||
run: |
|
||||
TAG_NAME=$(cat version.txt)
|
||||
echo "📦 Creating release for tag: $TAG_NAME"
|
||||
|
||||
curl -sSL -X POST "$FORGEJO_API/repos/${OWNER}/${REPO}/releases" \
|
||||
-H "Authorization: token $FORGEJO_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
|
@ -82,11 +89,13 @@ jobs:
|
|||
FORGEJO_API: https://weforge.xyz/api/v1
|
||||
OWNER: partisan
|
||||
REPO: Pulse
|
||||
TAG_NAME: ${{ env.TAG_NAME }}
|
||||
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
|
||||
|
||||
- name: Upload APK to release
|
||||
run: |
|
||||
TAG_NAME=$(cat version.txt)
|
||||
echo "📤 Uploading APK to release tag: $TAG_NAME"
|
||||
|
||||
RELEASE_ID=$(curl -s -H "Authorization: token $FORGEJO_TOKEN" \
|
||||
"$FORGEJO_API/repos/${OWNER}/${REPO}/releases/tags/$TAG_NAME" | jq -r .id)
|
||||
|
||||
|
@ -98,7 +107,6 @@ jobs:
|
|||
FORGEJO_API: https://weforge.xyz/api/v1
|
||||
OWNER: partisan
|
||||
REPO: Pulse
|
||||
TAG_NAME: ${{ env.TAG_NAME }}
|
||||
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
|
||||
|
||||
- name: Cleanup secrets
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue