Vydia / react-native-background-upload

Upload files in your React Native app even while it's backgrounded. Supports Android and iOS, including camera roll assets.
MIT License
723 stars 330 forks source link

Fix CI & migrate to mavenCentral #249

Closed Mookiies closed 3 years ago

Mookiies commented 3 years ago

Summary

  1. Bump joschi/setup-jdk from v1 to v2 (latest) to fix CI for android
  2. Swap jcenter with mavenCentral due to upcoming (feb 2022) jcenter deprecation: https://developer.android.com/studio/build/jcenter-migration. Done for library and example app.

Android CI Error

This error in the use specific Java version for sdk manager to work job is solved by version bump allowing for android builds to pass the github workflow

Error: Unable to process command '::set-env name=JAVA_HOME::/Users/runner/hostedtoolcache/AdoptOpenJDK/1.0.0-releases-openjdk8-hotspot-normal-latest/x64' successfully.
Error: The `set-env` command is disabled. Please upgrade to using Environment Files or opt into unsecure command execution by setting the `ACTIONS_ALLOW_UNSECURE_COMMANDS` environment variable to `true`. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
Error: Unable to process command '::set-env name=JAVA_HOME_openjdk8_x64::/Users/runner/hostedtoolcache/AdoptOpenJDK/1.0.0-releases-openjdk8-hotspot-normal-latest/x64' successfully.
Error: The `set-env` command is disabled. Please upgrade to using Environment Files or opt into unsecure command execution by setting the `ACTIONS_ALLOW_UNSECURE_COMMANDS` environment variable to `true`. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
Error: Unable to process command '::add-path::/Users/runner/hostedtoolcache/AdoptOpenJDK/1.0.0-releases-openjdk8-hotspot-normal-latest/x64/bin' successfully.
Error: The `add-path` command is disabled. Please upgrade to using Environment Files or opt into unsecure command execution by setting the `ACTIONS_ALLOW_UNSECURE_COMMANDS` environment variable to `true`. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/

Test Plan

Make CI Green + check Example app on both iOS and android simulators

Checklist

Mookiies commented 3 years ago

I also took a stab at fixing the iOS workflows failure but was unsuccessful so I created this issue https://github.com/Vydia/react-native-background-upload/issues/250

reime005 commented 3 years ago

@Mookiies I think iOS can be fixed by this, could you test/ this in your branch?: https://github.com/Vydia/react-native-background-upload/commit/6fed07c725df10ba557e7345aef6a3546f9e96fc

Mookiies commented 3 years ago

@reime005 That commit makes it pass the workflow 🎉

I've cherry-picked that commit and added it to this branch/pr

reime005 commented 3 years ago

@Mookiies Cool, thanks! Will merge

github-actions[bot] commented 3 years ago

:tada: This PR is included in version 6.2.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: