Skip to content

Commit

Permalink
conditional for changelog & fix fetch-depth
Browse files Browse the repository at this point in the history
  • Loading branch information
cuong-tran committed May 10, 2024
1 parent 3f04c99 commit 4583107
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ jobs:
- name: Set CHANGELOG
id: set_changelog
if: github.event.inputs.git-ref != 'master'
run: |
changelog="$(git log ${{ steps.prepare_env.outputs.PREV_RELEASE_SHA }}..${{ steps.prepare_env.outputs.CURRENT_SHA }} --pretty=format:'{{changelogtext}}%s (@%an){{!changelogtext}}')"
changelog="${changelog//$'%'/%25}"
Expand All @@ -95,7 +96,6 @@ jobs:
changelog="$(echo $changelog | sed -e 's/{{!changelogtext}}/<\/changelogtext>/g')"
changelog="<?xml version=\"1.0\" encoding=\"utf-8\"?><changelog bulletedList=\"true\"><changelogversion versionName=\"${{ github.run_number }}\" changeDate=\"\">$changelog</changelogversion></changelog>"
echo "CHANGELOG=$changelog" >> $GITHUB_OUTPUT
echo "$changelog"
build-app:
runs-on: ubuntu-latest
Expand All @@ -105,6 +105,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: 'komikku-app/komikku'
fetch-depth: 0
ref: ${{ github.event.inputs.git-ref }}

- name: Set up gradle
Expand Down Expand Up @@ -147,7 +148,7 @@ jobs:
# - name: Build app and run unit tests
# uses: gradle/gradle-command-action@v2
# with:
# arguments: detekt assembleStandardPreview testPreviewUnitTest
# arguments: detekt assembleStandardPreview testStandardPreviewUnitTest

- name: Build Preview APK
run: ./gradlew assembleStandardPreview testStandardPreviewUnitTest --stacktrace
Expand Down

0 comments on commit 4583107

Please sign in to comment.