-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI: Automatically Generating a GitHub Release with APK and AAB files on new Tag. #303
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
00554d5
Update README.md
vitorpamplona 8772f6a
Update README.md
vitorpamplona e11c01e
Adding GitHub Action to create a release file
vitorpamplona 8b34f11
Merge pull request #1 from vitorpamplona/create-release
vitorpamplona 455ea3d
Reverting Readme Bluetooth description.
vitorpamplona b985fe6
Testing on all commits
vitorpamplona 76e09b2
Removing working directory from signing
vitorpamplona 809a102
Testing with Debug First.
vitorpamplona efa5074
Checking if release build configs were the bug we see in GitHub Actions
vitorpamplona 351aaeb
Fixing Release watch files issue.
vitorpamplona f1dd4f3
moving the Debug Build.
vitorpamplona 5dc3805
cleaning before bundle.
vitorpamplona 7ebe16f
Maybe bundling was the issue.
vitorpamplona 2c7de55
Fixing the directory of the AAB
vitorpamplona 5d2afe1
Activating by Release Tag.
vitorpamplona dae82f5
id fixes.
vitorpamplona 529cb3e
Fixing path
vitorpamplona 4593d32
Fixing APK Filenames
vitorpamplona File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Create Release Assets | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache node_modules/ | ||
uses: actions/cache@v1 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.OS }}-yarn-cache-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.OS }}-yarn-cache- | ||
|
||
- run: yarn --frozen-lockfile | ||
|
||
- name: Setup kernel for react native, increase watchers for release versions. | ||
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p | ||
|
||
- name: Build AAB | ||
run: ./gradlew clean bundleRelease --stacktrace | ||
working-directory: ./android | ||
|
||
- name: Sign AAB | ||
uses: r0adkll/sign-android-release@v1 | ||
with: | ||
releaseDirectory: android/app/build/outputs/bundle/release | ||
signingKeyBase64: ${{ secrets.SIGNING_KEY }} | ||
alias: ${{ secrets.KEY_ALIAS }} | ||
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} | ||
keyPassword: ${{ secrets.KEY_PASSWORD }} | ||
|
||
- name: Build APK | ||
run: ./gradlew assembleRelease --stacktrace | ||
working-directory: ./android | ||
|
||
- 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 Asset | ||
id: upload-release-asset-apk | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: android/app/build/outputs/apk/release/app-release-unsigned.apk | ||
asset_name: app-release-${{ github.ref }}.apk | ||
asset_content_type: application/zip | ||
|
||
- name: Upload AAB Asset | ||
id: upload-release-asset-aab | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: android/app/build/outputs/bundle/release/app.aab | ||
asset_name: app-release-${{ github.ref }}.aab | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here re version. |
||
asset_content_type: application/zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps SafePaths-vX.X.X.apk so that it's clear on their local machine the version.