Skip to content

Commit

Permalink
Fixes to publish apk and aab to release
Browse files Browse the repository at this point in the history
Signed-off-by: Yurii Surzhykov <yuriisurzhykov@gmail.com>
  • Loading branch information
yuriisurzhykov committed May 31, 2024
1 parent acc378d commit 2afbf21
Showing 1 changed file with 67 additions and 11 deletions.
78 changes: 67 additions & 11 deletions .github/workflows/release_feature_github.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,78 @@ jobs:
aab_file=$(find . -name '*.aab' -type f -path "*build/outputs/bundle/release/*" | head -1)
echo "aab_file=${aab_file}" >> $GITHUB_OUTPUT
- name: Get APK file path
id: apk-path
run: |
# Find the AAB file, accounting for potential variations in the filename.
apk_file=$(find . -name '*.apk' -type f -path "*build/outputs/apk/release/*" | head -1)
echo "apk_file=${aab_file}" >> $GITHUB_OUTPUT
- name: Upload AAB file to Artifacts
uses: actions/upload-artifact@v3
with:
path: ${{ steps.aab-path.outputs.aab_file }}

- name: Generate Universal APK file
uses: snnaplab/universal-apk-generate-action@v1
id: apk-generate
with:
aab-path: ${{ steps.aab-path.outputs.path }}
keystore-base64: ${{ secrets.KEYSTORE_FILE }}
keystore-password: ${{ secrets.KEYSTORE_PASSWORD }}
key-alias: ${{ secrets.KEY_ALIAS }}
key-password: ${{ secrets.KEY_PASSWORD }}

- name: Upload APK file to Artifacts
uses: actions/upload-artifact@v3
with:
path: ${{ steps.apk-generate.outputs.apk-path }}
path: ${{ steps.apk-path.outputs.apk_file }}

- name: Build Changelog
uses: ardalanamini/auto-changelog@v4
id: changelog
with:
github-token: ${{ github.token }}
commit-types: |
feat: New Features
fix: Bug Fixes
build: Build System & Dependencies
perf: Performance Improvements
docs: Documentation
test: Tests
refactor: Refactors
chore: Chores
ci: CI
style: Code Style
revert: Reverts
default-commit-type: Other Changes
release-name: v1.0.0
release-name-prefix: ""
mention-authors: true
mention-new-contributors: true
include-compare-link: true
include-pr-links: true
include-commit-links: true
semver: true
use-github-autolink: true

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload APK
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.apk-path.outputs.apk_file }}
asset_name: app-release-signed-${{ github.ref }}.apk
asset_content_type: application/zip

- name: Upload AAB
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.aab-path.outputs.aab_file }}
asset_name: app-release-signed-${{ github.ref }}.aab
asset_content_type: application/zip

0 comments on commit 2afbf21

Please sign in to comment.