ci: move versionCode bump to build
This commit is contained in:
parent
83c0ff497b
commit
4bdc43deb3
|
@ -104,6 +104,15 @@ jobs:
|
|||
if: ${{ inputs.build_type == 'debug' }}
|
||||
run: ./gradlew :app:assembleFdroidDebug --stacktrace
|
||||
|
||||
# bump versionCode for nightly and prerelease builds
|
||||
- name: Commit and push versionCode changes
|
||||
if: ${{ inputs.build_type == 'nightly' || inputs.build_type == 'prerelease' }}
|
||||
run: |
|
||||
git config --global user.name 'GitHub Actions'
|
||||
git config --global user.email 'actions@github.com'
|
||||
git add versionCode.txt
|
||||
git commit -m "Automated build update"
|
||||
|
||||
- name: Get release apk path
|
||||
id: apk-path
|
||||
run: echo "path=$(find . -regex '^.*/build/outputs/apk/fdroid/${{ inputs.build_type }}/.*\.apk$' -type f | head -1 | tail -c+2)" >> $GITHUB_OUTPUT
|
||||
|
|
|
@ -114,14 +114,6 @@ jobs:
|
|||
version_code=$(grep "VERSION_CODE" buildSrc/src/main/kotlin/Constants.kt | awk '{print $5}' | tr -d '\n')
|
||||
echo "VERSION_CODE=$version_code" >> $GITHUB_ENV
|
||||
|
||||
- name: Commit and push versionCode changes
|
||||
if: ${{ inputs.release_type == '' || inputs.release_type == 'nightly' || inputs.release_type == 'prerelease' }}
|
||||
run: |
|
||||
git config --global user.name 'GitHub Actions'
|
||||
git config --global user.email 'actions@github.com'
|
||||
git add versionCode.txt
|
||||
git commit -m "Automated build update"
|
||||
|
||||
- name: Push changes
|
||||
if: ${{ inputs.release_type == '' || inputs.release_type == 'nightly' || inputs.release_type == 'prerelease' }}
|
||||
uses: ad-m/github-push-action@master
|
||||
|
|
Loading…
Reference in New Issue