Update build.yml #16
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
name: react-native-android-build-apk | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
install-and-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install npm dependencies | ||
run: npm install | ||
# build-android: | ||
# needs: install-and-test | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - name: Install npm dependencies | ||
# run: npm install | ||
# - name: Set up JDK 11 | ||
# uses: actions/setup-java@v2 | ||
# with: | ||
# distribution: 'adopt' | ||
# java-version: '11' | ||
# - name: Set up Android SDK | ||
# uses: android-actions/setup-android@v2 | ||
# with: | ||
# api-level: 30 | ||
# target: default | ||
# build-tools: 29.0.3 | ||
# - name: Setup build tool version variable | ||
# shell: bash | ||
# run: | | ||
# BUILD_TOOL_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1) | ||
# echo "BUILD_TOOL_VERSION=$BUILD_TOOL_VERSION" >> $GITHUB_ENV | ||
# echo Last build tool version is: $BUILD_TOOL_VERSION | ||
# - name: Decode Keystore | ||
# run: echo "${{ secrets.ANDROID_SIGNING_KEY }}" | base64 --decode > android/app/my-upload-key.keystore | ||
# - name: Build Android Release | ||
# run: cd android && ./gradlew assembleRelease --no-daemon | ||
# - name: Sign APK | ||
# id: sign_app | ||
# uses: r0adkll/sign-android-release@v1 | ||
# with: | ||
# releaseDirectory: android/app/build/outputs/apk/release | ||
# signingKeyBase64: ${{ secrets.ANDROID_SIGNING_KEY }} | ||
# alias: ${{ secrets.ANDROID_ALIAS }} | ||
# keyStorePassword: ${{ secrets.ANDROID_KEY_STORE_PASSWORD }} | ||
# keyPassword: ${{ secrets.ANDROID_KEY_PASSWORD }} | ||
# env: | ||
# BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOL_VERSION }} | ||
# - name: Upload Artifact | ||
# uses: actions/upload-artifact@v1 | ||
# with: | ||
# name: app-release.apk | ||
# path: android/app/build/outputs/apk/release/ | ||
release-android: | ||
name: Create Android Release | ||
runs-on: ubuntu-latest | ||
needs: build-android | ||
Check failure on line 60 in .github/workflows/build.yml GitHub Actions / react-native-android-build-apkInvalid workflow file
|
||
steps: | ||
- name: Download artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: app-release.apk | ||
- name: Test artifact download | ||
run: ls -R | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
body: | | ||
Changes in this release | ||
- First Change | ||
- Second Change | ||
draft: false | ||
prerelease: false |