Skip to content

Commit 4dff30e

Browse files
committed
added share-this-step workflow
1 parent 4a6f035 commit 4dff30e

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

bitrise.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,48 @@ workflows:
3939
- content: |-
4040
echo "-> BITRISE_IPA_PATH: ${BITRISE_IPA_PATH}"
4141
echo "-> BITRISE_DSYM_PATH: ${BITRISE_DSYM_PATH}"
42+
43+
44+
# ----------------------------------------------------------------
45+
# --- workflows to Share this step into a Step Library
46+
share-this-step:
47+
envs:
48+
# if you want to share this step into a StepLib
49+
- MY_STEPLIB_REPO_FORK_GIT_URL:
50+
- STEP_ID_IN_STEPLIB: xcode-archive
51+
- STEP_GIT_VERION_TAG_TO_SHARE: 1.4.1
52+
- STEP_GIT_CLONE_URL: https://github.com/bitrise-io/steps-xcode-archive.git
53+
description: |-
54+
If this is the first time you try to share a Step you should
55+
first call: $ bitrise share
56+
57+
This will print you a guide, and information about how Step sharing
58+
works. Please read it at least once!
59+
60+
As noted in the Step sharing guide you'll have to fork the
61+
StepLib you want to share this step into. Once you're done with forking
62+
the repository you should set your own fork's git clone URL
63+
in the `.bitrise.secrets.yml` file, or here in the `envs` section,
64+
as the value of the `MY_STEPLIB_REPO_FORK_GIT_URL` environment.
65+
66+
You're now ready to share this Step, just make sure that
67+
the `STEP_ID_IN_STEPLIB` and `STEP_GIT_VERION_TAG_TO_SHARE`
68+
environments are set to the desired values!
69+
70+
To share this Step into a StepLib you can just run: $ bitrise run share-this-step
71+
72+
Once it finishes the only thing left is to actually create a Pull Request,
73+
the way described in the guide printed at the end of the process.
74+
steps:
75+
- script:
76+
inputs:
77+
- content: |-
78+
#!/bin/bash
79+
set -e
80+
set -x
81+
82+
bitrise share start -c ${MY_STEPLIB_REPO_FORK_GIT_URL}
83+
84+
bitrise share create --stepid ${STEP_ID_IN_STEPLIB} --tag ${STEP_GIT_VERION_TAG_TO_SHARE} --git ${STEP_GIT_CLONE_URL}
85+
86+
bitrise share finish

0 commit comments

Comments
 (0)