|
| 1 | +# Firebase App Distribution |
| 2 | + |
| 3 | +Upload your app binaries to Firebase and sends email to your testers. |
| 4 | + |
| 5 | + |
| 6 | +## How to use this Step |
| 7 | + |
| 8 | +Can be run directly with the [bitrise CLI](https://github.com/bitrise-io/bitrise), |
| 9 | +just `git clone` this repository, `cd` into it's folder in your Terminal/Command Line |
| 10 | +and call `bitrise run test`. |
| 11 | + |
| 12 | +*Check the `bitrise.yml` file for required inputs which have to be |
| 13 | +added to your `.bitrise.secrets.yml` file!* |
| 14 | + |
| 15 | +Step by step: |
| 16 | + |
| 17 | +1. Open up your Terminal / Command Line |
| 18 | +2. `git clone` the repository |
| 19 | +3. `cd` into the directory of the step (the one you just `git clone`d) |
| 20 | +5. Create a `.bitrise.secrets.yml` file in the same directory of `bitrise.yml` |
| 21 | + (the `.bitrise.secrets.yml` is a git ignored file, you can store your secrets in it) |
| 22 | +6. Check the `bitrise.yml` file for any secret you should set in `.bitrise.secrets.yml` |
| 23 | + * Best practice is to mark these options with something like `# define these in your .bitrise.secrets.yml`, in the `app:envs` section. |
| 24 | +7. Once you have all the required secret parameters in your `.bitrise.secrets.yml` you can just run this step with the [bitrise CLI](https://github.com/bitrise-io/bitrise): `bitrise run test` |
| 25 | + |
| 26 | +An example `.bitrise.secrets.yml` file: |
| 27 | + |
| 28 | +``` |
| 29 | +envs: |
| 30 | +- A_SECRET_PARAM_ONE: the value for secret one |
| 31 | +- A_SECRET_PARAM_TWO: the value for secret two |
| 32 | +``` |
| 33 | + |
| 34 | +## How to create your own step |
| 35 | + |
| 36 | +1. Create a new git repository for your step (**don't fork** the *step template*, create a *new* repository) |
| 37 | +2. Copy the [step template](https://github.com/bitrise-steplib/step-template) files into your repository |
| 38 | +3. Fill the `step.sh` with your functionality |
| 39 | +4. Wire out your inputs to `step.yml` (`inputs` section) |
| 40 | +5. Fill out the other parts of the `step.yml` too |
| 41 | +6. Provide test values for the inputs in the `bitrise.yml` |
| 42 | +7. Run your step with `bitrise run test` - if it works, you're ready |
| 43 | + |
| 44 | +__For Step development guidelines & best practices__ check this documentation: [https://github.com/bitrise-io/bitrise/blob/master/_docs/step-development-guideline.md](https://github.com/bitrise-io/bitrise/blob/master/_docs/step-development-guideline.md). |
| 45 | + |
| 46 | +**NOTE:** |
| 47 | + |
| 48 | +If you want to use your step in your project's `bitrise.yml`: |
| 49 | + |
| 50 | +1. git push the step into it's repository |
| 51 | +2. reference it in your `bitrise.yml` with the `git::PUBLIC-GIT-CLONE-URL@BRANCH` step reference style: |
| 52 | + |
| 53 | +``` |
| 54 | +- git::https://github.com/user/my-step.git@branch: |
| 55 | + title: My step |
| 56 | + inputs: |
| 57 | + - my_input_1: "my value 1" |
| 58 | + - my_input_2: "my value 2" |
| 59 | +``` |
| 60 | + |
| 61 | +You can find more examples of step reference styles |
| 62 | +in the [bitrise CLI repository](https://github.com/bitrise-io/bitrise/blob/master/_examples/tutorials/steps-and-workflows/bitrise.yml#L65). |
| 63 | + |
| 64 | +## How to contribute to this Step |
| 65 | + |
| 66 | +1. Fork this repository |
| 67 | +2. `git clone` it |
| 68 | +3. Create a branch you'll work on |
| 69 | +4. To use/test the step just follow the **How to use this Step** section |
| 70 | +5. Do the changes you want to |
| 71 | +6. Run/test the step before sending your contribution |
| 72 | + * You can also test the step in your `bitrise` project, either on your Mac or on [bitrise.io](https://www.bitrise.io) |
| 73 | + * You just have to replace the step ID in your project's `bitrise.yml` with either a relative path, or with a git URL format |
| 74 | + * (relative) path format: instead of `- original-step-id:` use `- path::./relative/path/of/script/on/your/Mac:` |
| 75 | + * direct git URL format: instead of `- original-step-id:` use `- git::https://github.com/user/step.git@branch:` |
| 76 | + * You can find more example of alternative step referencing at: https://github.com/bitrise-io/bitrise/blob/master/_examples/tutorials/steps-and-workflows/bitrise.yml |
| 77 | +7. Once you're done just commit your changes & create a Pull Request |
| 78 | + |
| 79 | + |
| 80 | +## Share your own Step |
| 81 | + |
| 82 | +You can share your Step or step version with the [bitrise CLI](https://github.com/bitrise-io/bitrise). If you use the `bitrise.yml` included in this repository, all you have to do is: |
| 83 | + |
| 84 | +1. In your Terminal / Command Line `cd` into this directory (where the `bitrise.yml` of the step is located) |
| 85 | +1. Run: `bitrise run test` to test the step |
| 86 | +1. Run: `bitrise run audit-this-step` to audit the `step.yml` |
| 87 | +1. Check the `share-this-step` workflow in the `bitrise.yml`, and fill out the |
| 88 | + `envs` if you haven't done so already (don't forget to bump the version number if this is an update |
| 89 | + of your step!) |
| 90 | +1. Then run: `bitrise run share-this-step` to share the step (version) you specified in the `envs` |
| 91 | +1. Send the Pull Request, as described in the logs of `bitrise run share-this-step` |
| 92 | + |
| 93 | +That's all ;) |
0 commit comments