Skip to content

Commit 008c5ca

Browse files
committed
Fix commit messages not being included correctly and fix path to asset
1 parent b5980cc commit 008c5ca

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/release.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
- uses: actions/checkout@v4
1313
with:
1414
submodules: 'recursive'
15+
fetch-depth: 0
1516

1617
- name: Set up JDK 17
1718
uses: actions/setup-java@v4
@@ -45,6 +46,7 @@ jobs:
4546
id: get_commits
4647
run: |
4748
LAST_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
49+
echo "Last tag: $LAST_TAG"
4850
if [ -z "$LAST_TAG" ]; then
4951
echo "No previous tag found. Getting all commits."
5052
git log --pretty=format:'%h %s' > commits.txt
@@ -74,12 +76,22 @@ jobs:
7476
draft: false
7577
prerelease: false
7678

79+
- name: Set APK asset path without 'v' prefix
80+
id: set_apk_path
81+
run: |
82+
APK_NAME="ImmichTV-${GITHUB_REF_NAME#v}.apk"
83+
echo "apk_name=$APK_NAME" >> $GITHUB_OUTPUT
84+
echo "apk_path=app/build/outputs/apk/release/$APK_NAME" >> $GITHUB_OUTPUT
85+
echo "APK Name: $APK_NAME"
86+
echo "APK Path: app/build/outputs/apk/release/$APK_NAME"
87+
ls -l app/build/outputs/apk/release/
88+
7789
- name: Upload APK Asset
7890
uses: actions/upload-release-asset@v1
7991
env:
8092
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8193
with:
8294
upload_url: ${{ steps.create_release.outputs.upload_url }}
83-
asset_path: app/build/outputs/apk/release/ImmichTV-${{ github.ref_name }}.apk
84-
asset_name: ImmichTV-${{ github.ref_name }}.apk
95+
asset_path: ${{ steps.set_apk_path.outputs.apk_path }}
96+
asset_name: ${{ steps.set_apk_path.outputs.apk_name }}
8597
asset_content_type: application/vnd.android.package-archive

0 commit comments

Comments
 (0)