question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upgrade to latest GitHub Actions version

See original GitHub issue

Topic and scope of discussion

A summary of all changes to upgrade Expo GitHub Actions to the latest Actions version.

Motivation

From 30 Sept 2019 the old HCL syntax of GitHub Actions is deprecated. That means we have to upgrade the documentation and see if we need to make additional changes to the project.

Additional context

  • Research about Docker vs JavaScript actions
  • Research runs vs args notations in YAML
  • Replace old Docker-label metadata with YAML

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
byCedriccommented, Sep 28, 2019

@Kampe Thanks for the solution ❤️ I like the approach of using the docker image within the new GH Actions syntax, but remember there are some functionalities that you lose (like using windows/mac as OS). The approach you use is robust and will still work after we release the updated version, or when GH pulls the plug on their HCL syntax end of this month.

I have updated the action to the new yml format. Basically, it installs the requested version that you want on the system you use (e.g. ubuntu-latest, macos-latest or windows-latest). Since Github does not support proper caching across jobs, I’ve held back this update. Could you try if the new one works without issues on your setup? Here is some basic configuration you can use that should work out of the box.

name: New Expo Action
on: [push]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v1
      - name: Setup Node.js 12.x
        uses: actions/setup-node@v1
        with:
          node-version: 12.x
      - name: Setup Expo CLI 3.x
        uses: expo/expo-github-action@refactor/update-action
        with:
          expo-version: 3.x
          expo-username: ${{ secrets.EXPO_CLI_USERNAME }}
          expo-password: ${{ secrets.EXPO_CLI_PASSWORD }}
      - name: Install Dependencies
        run: npm install
      - name: Publish to Expo
        run: expo publish

If you are curious and want to go all the way, here is a slightly modified version that uses ubuntu, macos and windows for node 10 and 12 and all using both npm and yarn. I wouldn’t recommend publishing from all these jobs, but you can perform the tests on all of them, for example. It should help you make sure nothing breaks on any combination of all these system conditions (useful for large teams with mixed dev machine types 😄).

name: New Expo Action on Steroids
on: [push]
jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        node: [10, 12]
        packager: [npm, yarn]
        os:
          - ubuntu-latest
          - macos-latest
          - windows-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v1
      - name: Setup Node.js ${{ matrix.node }}
        uses: actions/setup-node@v1
        with:
          node-version: ${{ matrix.node }}
      - name: Setup Expo CLI 3.x
        uses: expo/expo-github-action@refactor/update-action
        with:
          expo-version: 3.x
          expo-username: ${{ secrets.EXPO_CLI_USERNAME }}
          expo-password: ${{ secrets.EXPO_CLI_PASSWORD }}
          expo-packager: ${{ matrix.packager }}
      - name: Install Dependencies
        run: npm install
      - name: Test Expo app
        run: npm test
3reactions
byCedriccommented, Sep 10, 2019

I’ve drafted a new version at refactor/update-action! Currently, it’s working, but I’m not happy about the performance. We definitely need a way to cache the installed Expo files, but unfortunately, there is none (yet).

I prefer to wait to release this version when they have this implemented, or the HCL syntax is EOL. For now, you can use the new action by specifying the branch name. I’ll update the documentation when I get some time available again.

Also, another heads up, the Docker images are dropped in this version. Because I (and the company I work for) use these images, I moved them to another repository. It’s using the same image name as before but is its own project for now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Marketplace Actions GitHub Actions Version Updater
GitHub Actions Version Updater is a GitHub Action that is used to Update All GitHub Actions in a Repository and create a pull...
Read more >
Update Major Version · Actions · GitHub Marketplace
This GitHub Action updates major version tags (e.g. v1, v2) when semantic versioning tag is pushed. If v1.2.3 tag is pushed, it updates...
Read more >
Using the latest version of the official bundled actions
To update the bundled actions, you can use the actions-sync tool to update the snapshot. For more information on using actions-sync , see...
Read more >
Update Files Version Field · Actions · GitHub Marketplace
Update your files version field on new releases. ... Most actions related to version upgrade do it backwards: when you push a commit...
Read more >
Update Release · Actions · GitHub Marketplace
This update-release action makes sane choices all the way along this process, but it lets you override those choices easily. Every time a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found