Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: setup expo preview #246

Merged
merged 14 commits into from
Nov 25, 2021
Merged

chore: setup expo preview #246

merged 14 commits into from
Nov 25, 2021

Conversation

allforabit
Copy link
Contributor

No description provided.

@allforabit allforabit self-assigned this Nov 24, 2021
@allforabit allforabit marked this pull request as draft November 24, 2021 17:24
@allforabit allforabit linked an issue Nov 24, 2021 that may be closed by this pull request
@github-actions

This comment has been minimized.

@allforabit
Copy link
Contributor Author

@simoneb there seems to be some issues with the expo action and the QR code is incorrect. See issue here: expo/expo-preview-action#6 I can find the project link in the command line output and that points here: https://expo.dev/@nearform/optic-expo?release-channel=pr-246 However that doesn't seem to be working on my device.

@simoneb
Copy link
Member

simoneb commented Nov 25, 2021

Before we troubleshoot this can you please align it to how it's done in https://github.com/nearform/optic-expo/blob/master/.github/workflows/publish.yml? E.g. the environment handling

@github-actions
Copy link

App is ready for review, you can see it here.

Copy link
Member

@simoneb simoneb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works but I think we can do better. There is quite a bit of duplication between the existing publish workflow and this new reusable workflow.

They are doing exactly the same thing except for the handling of the release channel. I would suggest that:

  1. we create a single reusable workflow which does the publishing
  2. it takes as input the release channel, with the default value being default
  3. it's fine to always comment on the PR even when the release channel is default
  4. invoke this reusable workflow both from the publish workflow and from the ci workflow. In the latter case, it will provide a release-channel input with value pr-${{ github.event.number }}

Minor:

  • I prefer removing all the names on the steps, they're usually redundant and unnecessarily clutter the workflow code
  • point to specific versions of third party actions instead of master

.github/workflows/ci.yml Outdated Show resolved Hide resolved
@github-actions
Copy link

App is ready for review, you can see it here.

1 similar comment
@github-actions
Copy link

App is ready for review, you can see it here.

@allforabit
Copy link
Contributor Author

I think it's right now and hope it's what you had in mind as far as sharing the expo publishing action. One thing is it's set to use this current branch ( uses: nearform/optic-expo/.github/workflows/expo-publish.yml@chore/expo-preview) but should be master. The build will fail if I do this though.

@github-actions
Copy link

App is ready for review, you can see it here.

@@ -0,0 +1,15 @@
name: publish
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's keep the name consistent with the file name, hence: cd

Copy link
Member

@simoneb simoneb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments but this is the implementation I had in mind 👌

.github/workflows/cd.yml Outdated Show resolved Hide resolved
.github/workflows/expo-publish.yml Outdated Show resolved Hide resolved
.github/workflows/expo-publish.yml Outdated Show resolved Hide resolved
.github/workflows/expo-publish.yml Outdated Show resolved Hide resolved
.github/workflows/expo-publish.yml Outdated Show resolved Hide resolved
.github/workflows/cd.yml Outdated Show resolved Hide resolved
Co-authored-by: Simone Busoli <[email protected]>
@github-actions
Copy link

App is ready for review, you can see it here.

@github-actions
Copy link

App is ready for review, you can see it here.

@github-actions
Copy link

App is ready for review, you can see it here.

@allforabit allforabit marked this pull request as ready for review November 25, 2021 13:08
@allforabit
Copy link
Contributor Author

I've set this to run on the action from the master branch so it's failing. It'll work once it's merged in.

.github/workflows/expo-publish.yml Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
allforabit and others added 2 commits November 25, 2021 14:18
Co-authored-by: Simone Busoli <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expo preview Github Action
2 participants