Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
abdallahmehiz committed Aug 24, 2024
1 parent 5ced512 commit ad3ae56
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,29 +30,16 @@ jobs:
- name: Make gradlew executable
run: chmod +x ./gradlew

- name: Build with Gradle
run: ./gradlew assemblePreview

- name: Sign apk
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/apk/preview
signingKeyBase64: ${{ secrets.SIGNING_KEYSTORE }}
alias: ${{ secrets.SIGNING_KEY_ALIAS }}
keyStorePassword: ${{ secrets.SIGNING_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: "34.0.0"

- name: Prepare release
run: |
set -e
echo "COMMIT_COUNT=$(git rev-list --count HEAD)" >> $GITHUB_ENV
commit_count=(git rev-list --count HEAD)
echo "COMMIT_COUNT=$commit_count)" >> $GITHUB_ENV
echo "COMMIT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "CURRENT_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV
prev_commit_count=$(echo "${{ steps.last_release.outputs.tag_name }}" | sed -e "s/^r//")
commit_count_diff=$(expr ${{ env.COMMIT_COUNT }} - $prev_commit_count)
commit_count_diff=$(expr ${{ }} - $prev_commit_count)
[ $commit_count_diff != 0 ] || exit 1
commit_count_diff_plus_one=$(expr $commit_count_diff + 1)
prev_release_sha=$(git log --topo-order -n $commit_count_diff --skip $commit_count_diff --max-count 1 --pretty=format:"%H")
Expand All @@ -65,6 +52,20 @@ jobs:
| jq -r '.[]|"- \(.message | first) (@\(.username))"')
{delimiter}" >> $GITHUB_ENV
- name: Build with Gradle
run: ./gradlew assemblePreview

- name: Sign apk
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/apk/preview
signingKeyBase64: ${{ secrets.SIGNING_KEYSTORE }}
alias: ${{ secrets.SIGNING_KEY_ALIAS }}
keyStorePassword: ${{ secrets.SIGNING_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: "34.0.0"

- name: Copy build artifacts
run: |
set -e
Expand Down

0 comments on commit ad3ae56

Please sign in to comment.