Compare commits

..
11 Commits
23 changed files with 263 additions and 39 deletions

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
---
name: Bug report
about: Create a report to help us improve
---
### Description of the bug
How would you shortly summarise the issue?
### To Reproduce
What steps did you perform which led to this issue?
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
#### Expected behavior
What did you expect to have happened?
#### Actual behavior
What did it actually result in?
### Additional context
Can you further explain the issue? E.g., information about version/environment or screenshots.
+13
View File
@@ -0,0 +1,13 @@
---
name: New discussion
about: Start a discussion about a certain topic
---
### Topic and scope of discussion
How would you summarise and scope the issue?
### Motivation
Why should we have this discussion?
### Additional context
Can you further explain the purpose of this discussion? E.g., screenshots or real-world examples.
+13
View File
@@ -0,0 +1,13 @@
---
name: Feature request
about: Suggest an idea for this project
---
### Description of the feature
How would you briefly summarise the feature?
### Motivation
Why does this feature should be implemented?
### Additional context
Can you further explain the feature? E.g., screenshots or real-world examples.
+13
View File
@@ -0,0 +1,13 @@
---
name: Minor changes
about: Suggest a small change, or fix, like typos
---
#### Old version
What did you find that should be changed?
#### New version
How should it look after the suggested change?
### Additional context
Can you further clarify the change? E.g., link to a dictionary or real-world examples.
+5
View File
@@ -0,0 +1,5 @@
### Linked issue
Provide the issue(s) which this pull request relates to or fixes.
### Additional context
Are there things the maintainers should be aware of before merging or closing this pull request?
+30
View File
@@ -1,3 +1,33 @@
## [2.2.0](https://github.com/bycedric/ci-expo/compare/2.1.0...2.2.0) (2019-04-10)
### Code refactors
* use better expo cli variables prefix ([cd75584](https://github.com/bycedric/ci-expo/commit/cd75584))
### Documentation changes
* pin actions to versions for future releases ([3c76843](https://github.com/bycedric/ci-expo/commit/3c76843))
## [2.1.0](https://github.com/bycedric/ci-expo/compare/2.0.0...2.1.0) (2019-04-10)
### Code refactors
* authenticate in main action if possible ([a401e30](https://github.com/bycedric/ci-expo/commit/a401e30))
* remove extraneous commands from base image ([a90ce59](https://github.com/bycedric/ci-expo/commit/a90ce59))
### Documentation changes
* add deprecation notice on all sub-actions ([b5a0311](https://github.com/bycedric/ci-expo/commit/b5a0311))
* add examples and more contextual info ([9625bb1](https://github.com/bycedric/ci-expo/commit/9625bb1))
* fix typo in documentation and use link references ([48bbaf3](https://github.com/bycedric/ci-expo/commit/48bbaf3))
* update license to 2019 ([7596f6b](https://github.com/bycedric/ci-expo/commit/7596f6b))
### Other chores
* add some issue templates to github ([9aec1f5](https://github.com/bycedric/ci-expo/commit/9aec1f5))
## [2.0.0](https://github.com/bycedric/ci-expo/compare/906c910...2.0.0) (2019-04-02)
### New features
+5 -1
View File
@@ -1,6 +1,10 @@
FROM bycedric/ci-expo:2
LABEL com.github.actions.name="Expo CLI (unofficial)"
LABEL com.github.actions.description="Use any Expo command in your GitHub Actions workflow."
LABEL com.github.actions.description="Use any Expo CLI command in your GitHub Actions workflow."
LABEL com.github.actions.icon="terminal"
LABEL com.github.actions.color="gray-dark"
COPY entrypoint.sh LICENSE.md README.md /
entrypoint ["/entrypoint.sh"]
+1 -1
View File
@@ -1,6 +1,6 @@
# The MIT License (MIT)
Copyright (c) 2018 Cedric van Putten <me@bycedric.com>
Copyright (c) 2019 Cedric van Putten <me@bycedric.com>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
+119 -22
View File
@@ -1,50 +1,141 @@
# Expo for GitHub Actions
> Both GitHub Actions and this library are highly unstable, do not use in production (yet).
> GitHub Actions is still in beta, use it at your own risk.
Publish, build or manage your [Expo](https://expo.io) Project with GitHub Actions!
Publish, build or manage your [Expo][link-expo] Project with GitHub Actions!
This repository contains a prebuilt base image with GitHub Actions implementations.
You can also use [the base image](base) in other Docker-based environments.
## Usage
## What's inside?
Below you can see an example workflow to get you started right away!
Within this Expo CLI action, you have full access to the original [Expo CLI][link-expo-cli].
That means you are able to perform any command like login, publish and build.
Also, this action will authenticate automatically when both `EXPO_CLI_USERNAME` and `EXPO_CLI_PASSWORD` variables are defined.
> Check out both [login](./login) and [publish](./publish) actions for more info.
> You don't necessarily need this action to use Expo.
> You can also add `expo-cli` as a dependency to your project and use the official [NPM action][link-actions-npm] for example.
> However, when you do that you need to manage authentication yourself.
### Why use a base-image?
Every GitHub action will start from scratch, using the dockerfile as the starting point.
If you define `expo-cli` in this dockerfile, it will install it every time you run an action.
By using a prebuilt image, it basically "skips" the process of downloading the full CLI over and over again.
This makes the Expo actions overall faster.
### Used secrets
To authenticate with your Expo account, use the variables listed below.
In the Expo action you can define `secrets = ["EXPO_CLI_USERNAME", "EXPO_CLI_PASSWORD"]` to have them available.
variable | description
--- | ---
`EXPO_CLI_USERNAME` | The email address or username of your Expo account.
`EXPO_CLI_PASSWORD` | The password of your Expo account, [automatically picked up by the cli][link-expo-cli-password].
> Some Expo commands don't require authentication.
> Simply omit the `secrets = [...]` if you don't need it.
## Example workflows
Before you dive into the workflow examples, you should know the basics of GitHub Actions.
You can read more about this in the [GitHub Actions documentation][link-actions].
1. [Publish on any push](#publish-on-any-push)
2. [Publish on a specific branch](#publish-on-a-specific-branch)
3. [Test and build web every day at 08:00](#test-and-build-web-every-day-at-0800)
### Publish on any push
Below you can see the example configuration to publish whenever the repository is updated.
The workflow listens to the `push` event and resolves directly to the `publish` action.
Before publishing your app, it installs your project's dependencies using the [NPM action][link-actions-npm].
```hcl
workflow "Install, Authenticate, and Publish" {
workflow "Install and Publish" {
on = "push"
resolves = ["Publish"]
}
action "Install" {
uses = "actions/npm@master"
uses = "actions/npm@1.0.0"
args = "install"
}
action "Authenticate" {
needs = "Install"
uses = "bycedric/ci-expo/login@master"
secrets = ["EXPO_USERNAME", "EXPO_PASSWORD"]
}
action "Publish" {
needs = "Authenticate"
uses = "bycedric/ci-expo/publish@master"
needs = "Install"
uses = "byCedric/ci-expo@2.2.0"
args = "publish"
secrets = ["EXPO_CLI_USERNAME", "EXPO_CLI_PASSWORD"]
}
```
### Custom command
### Publish on a specific branch
By default, you have full access to the actual [Expo CLI](https://docs.expo.io/versions/latest/workflow/expo-cli).
That means that you should be able to use every function from the CLI in your actions.
Below you can see how a custom command can be defined.
This workflow is similar to the [publish on any push](#publish-on-any-push) configuration.
It will install and test the code using the [NPM action][link-actions-npm] on every push.
But instead of publishing on any push too, it will publish on the `master` branch only.
```hcl
action "Doctor" {
uses = "bycedric/ci-expo@master"
args = "doctor"
workflow "Install and Publish" {
on = "push"
resolves = ["Publish"]
}
action "Install" {
uses = "actions/[email protected]"
args = "install"
}
action "Test" {
needs = "Install"
uses = "actions/[email protected]"
args = "test"
}
action "Filter branch" {
needs = "Test"
uses = "actions/bin/filter@master"
args = "branch master"
}
action "Publish" {
needs = "Filter branch"
uses = "byCedric/[email protected]"
args = "publish"
secrets = ["EXPO_CLI_USERNAME", "EXPO_CLI_PASSWORD"]
}
```
### Test and build web every day at 08:00
The most significant change here is that we've changed the workflow trigger.
Instead of listening to push events, it's scheduled to run every day at 08:00.
> For web builds, you don't need to be authenticated.
> That's why `secrets = [...]` is omitted here.
```hcl
workflow "Install, Test and Build Web" {
on = "schedule(0 8 * * *)"
resolves = ["Publish"]
}
action "Install" {
uses = "actions/[email protected]"
args = "install"
}
action "Test" {
needs = "Install"
uses = "actions/[email protected]"
args = "test"
}
action "Publish" {
needs = "Test"
uses = "byCedric/[email protected]"
args = "build:web"
}
```
@@ -57,3 +148,9 @@ The MIT License (MIT). Please see [License File](LICENSE.md) for more informatio
<p align="center">
with :heart: <a href="https://bycedric.com" target="_blank">byCedric</a>
</p>
[link-actions]: https://developer.github.com/actions/
[link-actions-npm]: https://github.com/actions/npm
[link-expo]: https://expo.io
[link-expo-cli]: https://docs.expo.io/versions/latest/workflow/expo-cli
[link-expo-cli-password]: https://github.com/expo/expo-cli/blob/8ea616d8848a123270b97e226e33dcb3dde49653/packages/expo-cli/src/accounts.js#L94
+1 -4
View File
@@ -1,7 +1,6 @@
FROM node:10
LABEL name="Expo for Docker"
LABEL version="2.0.0"
LABEL repository="https://github.com/bycedric/ci-expo"
LABEL homepage="https://github.com/bycedric/ci-expo/tree/master/base"
LABEL maintainer="Cedric van Putten <[email protected]>"
@@ -10,8 +9,6 @@ RUN npm install --global expo-cli@2 \
&& npm cache rm --force \
&& rm -rf ~/.npm
COPY LICENSE.md README.md /
COPY entrypoint.sh /entrypoint.sh
COPY entrypoint.sh LICENSE.md README.md /
ENTRYPOINT ["/entrypoint.sh"]
CMD ["--help"]
+1 -1
View File
@@ -1,6 +1,6 @@
# The MIT License (MIT)
Copyright (c) 2018 Cedric van Putten <me@bycedric.com>
Copyright (c) 2019 Cedric van Putten <me@bycedric.com>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
+6 -3
View File
@@ -1,6 +1,6 @@
# Expo for Docker
A prebuilt docker image to use the [Expo CLI](https://docs.expo.io/versions/latest/workflow/expo-cli) on Docker-based environments.
A prebuilt docker image to use the [Expo CLI][link-expo-cli] on Docker-based environments.
This image contains all necessary libraries to perform all commands of the CLI.
- Based on `node:10` image
@@ -12,7 +12,7 @@ The entry point of this image forwards to the Expo CLI itself.
With this entry point, you can provide any command directly to Docker.
When nothing is provided, it will output the help information provided by the CLI.
> The entry point uses `sh -c` to invoke Expo, making environment variable available to that command.
> The entry point uses `sh -c` to invoke Expo, making environment variables available to that command.
```bash
$ docker run --rm bycedric/ci-expo
@@ -21,7 +21,7 @@ $ docker run --rm -ti bycedric/ci-expo login
$ docker run --rm -ti --entrypoint sh bycedric/ci-expo
```
> This image is intended to use on Docker-based CI environments, see [the Expo CI guide](https://docs.expo.io/versions/latest/guides/setting-up-continuous-integration) to get started.
> This image is intended to use on Docker-based CI environments, see [the Expo CI guide][link-expo-cicd] to get started.
## License
@@ -32,3 +32,6 @@ The MIT License (MIT). Please see [License File](LICENSE.md) for more informatio
<p align="center">
with :heart: <a href="https://bycedric.com" target="_blank">byCedric</a>
</p>
[link-expo-cli]: https://docs.expo.io/versions/latest/workflow/expo-cli
[link-expo-cicd]: https://docs.expo.io/versions/latest/guides/setting-up-continuous-integration
+1 -1
View File
@@ -1,6 +1,6 @@
# The MIT License (MIT)
Copyright (c) 2018 Cedric van Putten <me@bycedric.com>
Copyright (c) 2019 Cedric van Putten <me@bycedric.com>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
+3
View File
@@ -1,5 +1,8 @@
# Expo Build Android for GitHub Actions
> **This sub-action is no longer required and will be removed in the next release.**
> _See the [example workflows](../README.md#example-workflows) for more info._
Create a new standalone Android build from your GitHub workflow.
Optionally, you can configure the properties of this standalone app.
+1 -1
View File
@@ -1,6 +1,6 @@
# The MIT License (MIT)
Copyright (c) 2018 Cedric van Putten <me@bycedric.com>
Copyright (c) 2019 Cedric van Putten <me@bycedric.com>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
+3
View File
@@ -1,5 +1,8 @@
# Expo Build iOS for GitHub Actions
> **This sub-action is no longer required and will be removed in the next release.**
> _See the [example workflows](../README.md#example-workflows) for more info._
Create a new standalone iOS build from your GitHub workflow.
Optionally, you can configure the properties of this standalone app.
@@ -1,6 +1,6 @@
# The MIT License (MIT)
Copyright (c) 2018 Cedric van Putten <me@bycedric.com>
Copyright (c) 2019 Cedric van Putten <me@bycedric.com>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
+4 -1
View File
@@ -1,7 +1,10 @@
# Expo Build Web for GitHub Actions
> **This sub-action is no longer required and will be removed in the next release.**
> _See the [example workflows](../README.md#example-workflows) for more info._
Create a new app web bundle from your GitHub workflow.
Optionally, you can configure the properties of this bunle.
Optionally, you can configure the properties of this bundle.
> Authentication is not required for this step.
Executable
+11
View File
@@ -0,0 +1,11 @@
#!/bin/sh -l
set -e
if [ -n "$EXPO_CLI_USERNAME" ] && [ -n "$EXPO_CLI_PASSWORD" ]; then
expo login --username $EXPO_CLI_USERNAME
else
echo 'Skipping Expo login, username and/or password not defined...'
fi
sh -c "expo $*"
+1 -1
View File
@@ -1,6 +1,6 @@
# The MIT License (MIT)
Copyright (c) 2018 Cedric van Putten <me@bycedric.com>
Copyright (c) 2019 Cedric van Putten <me@bycedric.com>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
+4 -1
View File
@@ -1,7 +1,10 @@
# Expo Login for GitHub Actions
> **This sub-action is no longer required and will be removed in the next release.**
> _See the [example workflows](../README.md#example-workflows) for more info._
Authenticate the current workflow to publish new versions or create new builds.
It works relatively simple, you define the Expo credentials and this action will do the rest.
It works relatively simple, you define the Expo credentials, and this action will do the rest.
## Usage
+1 -1
View File
@@ -1,6 +1,6 @@
# The MIT License (MIT)
Copyright (c) 2018 Cedric van Putten <me@bycedric.com>
Copyright (c) 2019 Cedric van Putten <me@bycedric.com>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
+3
View File
@@ -1,5 +1,8 @@
# Expo Publish for GitHub Actions
> **This sub-action is no longer required and will be removed in the next release.**
> _See the [example workflows](../README.md#example-workflows) for more info._
Publish a brand new release straight from your GitHub workflow.
Optionally, you can configure the release channel or manifest file.