mirror of
https://github.com/expo/expo-github-action.git
synced 2026-11-15 17:32:45 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d300b960e9 | ||
|
|
3cecf2eb8a | ||
|
|
5a73f07f49 | ||
|
|
830e647327 | ||
|
|
259d15d85b | ||
|
|
2606508023 | ||
|
|
8440fd9605 | ||
|
|
e6ba70ca50 | ||
|
|
d63621e22d | ||
|
|
5619369736 | ||
|
|
670b449e5b | ||
|
|
079b95e5d3 | ||
|
|
5a8228a651 | ||
|
|
3f0a4b5355 | ||
|
|
3beea56d80 | ||
|
|
5848f88b34 | ||
|
|
6b82e9e522 | ||
|
|
8e2559c349 | ||
|
|
f98a64c887 | ||
|
|
b3b45ee53f | ||
|
|
0811162597 | ||
|
|
088fd4e6fd | ||
|
|
b5a8ca7f7f | ||
|
|
72721e5519 | ||
|
|
ec1a49baeb | ||
|
|
1bde34e5c7 | ||
|
|
459b5673d5 | ||
|
|
eb1ffb8b23 | ||
|
|
db9b5ce00f | ||
|
|
9fce70f380 | ||
|
|
4681fcfc42 | ||
|
|
1f38d16d01 | ||
|
|
7cde8f899a |
No files matched your search
@@ -1,4 +0,0 @@
|
||||
module.exports = {
|
||||
ignorePatterns: ['build/**', 'node_modules/**'],
|
||||
extends: ['universe/node'],
|
||||
};
|
||||
@@ -19,14 +19,14 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 🏗 Setup repo
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 🏗 Setup Node
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.x
|
||||
cache: yarn
|
||||
|
||||
|
||||
- name: 📦 Install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
@@ -40,14 +40,14 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 🏗 Setup repo
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 🏗 Setup Node
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.x
|
||||
cache: yarn
|
||||
|
||||
|
||||
- name: 📦 Install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
@@ -61,10 +61,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 🏗 Setup repo
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 🏗 Setup Node
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.x
|
||||
cache: yarn
|
||||
@@ -74,7 +74,7 @@ jobs:
|
||||
|
||||
- name: 📦 Install semver
|
||||
run: yarn add --dev semver
|
||||
|
||||
|
||||
- name: 🕵️ Resolve major version
|
||||
uses: actions/github-script@v6
|
||||
id: version
|
||||
@@ -84,6 +84,9 @@ jobs:
|
||||
const semver = require('semver')
|
||||
const { version } = require('./package.json')
|
||||
return semver.major(version)
|
||||
|
||||
|
||||
- name: 🧹 Clean repo
|
||||
run: git clean . -xdf && git reset --hard HEAD && git pull && git fetch --tags
|
||||
|
||||
- name: 📋 Update tags
|
||||
run: git fetch --tags && git pull && git tag --force v${{ steps.version.outputs.result }} && git push --force --tags
|
||||
run: git tag --force v${{ steps.version.outputs.result }} && git push --force --tags
|
||||
@@ -18,10 +18,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 🏗 Setup repo
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 🏗 Setup Node
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
cache: yarn
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
run: yarn install --frozen-lockfile --check-files
|
||||
|
||||
- name: ✅ Lint code
|
||||
run: yarn lint
|
||||
run: yarn lint --max-warnings=0
|
||||
|
||||
- name: 🧪 Test code
|
||||
run: yarn test
|
||||
@@ -47,9 +47,9 @@ jobs:
|
||||
git diff
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
- name: 🗂 Upload build
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
|
||||
with:
|
||||
name: build
|
||||
|
||||
@@ -23,13 +23,26 @@ jobs:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- windows-latest
|
||||
- macos-latest
|
||||
cache:
|
||||
- with-cache
|
||||
- without-cache
|
||||
packager:
|
||||
- yarn
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
cache: without-cache
|
||||
packager: npm
|
||||
- os: windows-latest
|
||||
cache: without-cache
|
||||
packager: npm
|
||||
- os: macos-latest
|
||||
cache: without-cache
|
||||
packager: npm
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: 🏗 Setup repo
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 🏗 Setup Expo
|
||||
uses: ./
|
||||
@@ -38,8 +51,9 @@ jobs:
|
||||
eas-cache: ${{ matrix.cache == 'with-cache' }}
|
||||
expo-version: latest
|
||||
expo-cache: ${{ matrix.cache == 'with-cache' }}
|
||||
packager: ${{ matrix.packager }}
|
||||
token: ${{ secrets.EXPO_TOKEN }}
|
||||
|
||||
|
||||
- name: 🧪 EAS installed
|
||||
run: eas --version
|
||||
|
||||
@@ -53,12 +67,12 @@ jobs:
|
||||
- name: 🧪 Expo authenticated
|
||||
if: ${{ env.hasAuth == 'true' }}
|
||||
run: expo whoami
|
||||
|
||||
|
||||
preview-comment:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 🏗 Setup repo
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 🏗 Setup Expo
|
||||
uses: ./
|
||||
@@ -66,10 +80,10 @@ jobs:
|
||||
eas-version: latest
|
||||
expo-version: latest
|
||||
token: ${{ secrets.EXPO_TOKEN }}
|
||||
|
||||
|
||||
- name: 🏗 Setup project
|
||||
run: expo init -t blank ./temp
|
||||
|
||||
|
||||
- name: 🧪 Without commenting
|
||||
if: ${{ env.hasAuth == 'true' }}
|
||||
uses: ./preview-comment
|
||||
@@ -80,12 +94,12 @@ jobs:
|
||||
|
||||
- name: 🧪 Output has content
|
||||
if: ${{ env.hasAuth == 'true' }}
|
||||
uses: actions/github-script@v5
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
const message = `${{ steps.preview.outputs.message }}`
|
||||
if (!message) throw new Error('Message output is empty')
|
||||
|
||||
|
||||
- name: 🧪 Comment on PR (github-token)
|
||||
if: ${{ env.hasAuth == 'true' }}
|
||||
uses: ./preview-comment
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"printWidth": 120,
|
||||
"tabWidth": 2,
|
||||
"singleQuote": true,
|
||||
"bracketSameLine": true,
|
||||
"trailingComma": "es5",
|
||||
"arrowParens": "avoid",
|
||||
"endOfLine": "auto"
|
||||
}
|
||||
+76
-4
@@ -1,3 +1,75 @@
|
||||
## [7.2.1](https://github.com/expo/expo-github-action/compare/7.2.0...7.2.1) (2023-01-04)
|
||||
|
||||
|
||||
### Code changes
|
||||
|
||||
* drop rimraf dependency ([#203](https://github.com/expo/expo-github-action/issues/203)) ([830e647](https://github.com/expo/expo-github-action/commit/830e6473278701f5d83324a386c99662dc58e220))
|
||||
* update actions dependencies ([#202](https://github.com/expo/expo-github-action/issues/202)) ([259d15d](https://github.com/expo/expo-github-action/commit/259d15d85bd6a1444b37b23f5018e9b63d2643f3))
|
||||
* update dev dependencies ([#204](https://github.com/expo/expo-github-action/issues/204)) ([5a73f07](https://github.com/expo/expo-github-action/commit/5a73f07f497383964411bfd27e03c532c4b78db2))
|
||||
|
||||
|
||||
### Other chores
|
||||
|
||||
* bump @actions/core from 1.6.0 to 1.9.1 ([#191](https://github.com/expo/expo-github-action/issues/191)) ([670b449](https://github.com/expo/expo-github-action/commit/670b449e5b2cfd7c093d1ec54d935742ed3a0336))
|
||||
* bump ansi-regex from 5.0.0 to 5.0.1 ([#198](https://github.com/expo/expo-github-action/issues/198)) ([d63621e](https://github.com/expo/expo-github-action/commit/d63621e22d242a584d4d351448bf052dc47fe53c))
|
||||
* bump json5 from 1.0.1 to 1.0.2 ([#196](https://github.com/expo/expo-github-action/issues/196)) ([5a8228a](https://github.com/expo/expo-github-action/commit/5a8228a651a211f42988b0732878e6f43ed55f7f))
|
||||
* bump minimatch from 3.0.4 to 3.1.2 ([#197](https://github.com/expo/expo-github-action/issues/197)) ([5619369](https://github.com/expo/expo-github-action/commit/5619369736dbf3118c004c43dd34f1b0cd01d4dc))
|
||||
* bump qs from 6.5.2 to 6.5.3 ([#195](https://github.com/expo/expo-github-action/issues/195)) ([3beea56](https://github.com/expo/expo-github-action/commit/3beea56d800947f5f642529f112ddea7eb768c39))
|
||||
* bump semantic-release from 18.0.1 to 19.0.3 ([#185](https://github.com/expo/expo-github-action/issues/185)) ([079b95e](https://github.com/expo/expo-github-action/commit/079b95e5d39e2dc23018ce96c2c73ce1278841b5))
|
||||
* bump semver-regex from 3.1.3 to 3.1.4 ([#183](https://github.com/expo/expo-github-action/issues/183)) ([6b82e9e](https://github.com/expo/expo-github-action/commit/6b82e9e52206832cf878b2863e1c369dfb91ae5f))
|
||||
* rebuild all actions ([e6ba70c](https://github.com/expo/expo-github-action/commit/e6ba70ca50d4eec946753af4518355fb3e8df7dd))
|
||||
* update workflow actions to latest ([3cecf2e](https://github.com/expo/expo-github-action/commit/3cecf2eb8a1aec28f1de4401423eb501ab09cb1b))
|
||||
|
||||
|
||||
### Documentation changes
|
||||
|
||||
* **command:** update readme to fix badge ([#201](https://github.com/expo/expo-github-action/issues/201)) ([2606508](https://github.com/expo/expo-github-action/commit/26065080230b775cbb5a343ebfe866fd85da271e))
|
||||
* **preview-comment:** add missing permissions in examples ([#187](https://github.com/expo/expo-github-action/issues/187)) ([5848f88](https://github.com/expo/expo-github-action/commit/5848f88b34faf9f069239064e5fcff992266c126))
|
||||
* update badge urls in the readmes ([#199](https://github.com/expo/expo-github-action/issues/199)) ([8440fd9](https://github.com/expo/expo-github-action/commit/8440fd9605abc8291c6c947f0ecc51c5ad44c5f2))
|
||||
* update demo workflow to fix checkout issue ([#181](https://github.com/expo/expo-github-action/issues/181)) ([8e2559c](https://github.com/expo/expo-github-action/commit/8e2559c349b0b82eb2c3f1dc622f3ad9d4ed13b6))
|
||||
* use latest action verisons in readme ([#193](https://github.com/expo/expo-github-action/issues/193)) ([3f0a4b5](https://github.com/expo/expo-github-action/commit/3f0a4b53556cfbd02a236b3e524f5a23397e5693))
|
||||
|
||||
## [7.2.0](https://github.com/expo/expo-github-action/compare/7.1.1...7.2.0) (2022-04-07)
|
||||
|
||||
|
||||
### New features
|
||||
|
||||
* **comment:** add comment-based action to interact with eas in pulls ([#171](https://github.com/expo/expo-github-action/issues/171)) ([088fd4e](https://github.com/expo/expo-github-action/commit/088fd4e6fdfc0c17a87a176a2a7bee50b18482c9))
|
||||
|
||||
|
||||
### Other chores
|
||||
|
||||
* bump minimist from 1.2.5 to 1.2.6 ([#173](https://github.com/expo/expo-github-action/issues/173)) ([72721e5](https://github.com/expo/expo-github-action/commit/72721e5519453138c89882c06954665b116f1dc7))
|
||||
* clean the repo instead of checking out ([ec1a49b](https://github.com/expo/expo-github-action/commit/ec1a49baeb2ec1c952f1fc96f6c25baaaedeb40e))
|
||||
* disallow any linting issues for pulls ([#177](https://github.com/expo/expo-github-action/issues/177)) ([b5a8ca7](https://github.com/expo/expo-github-action/commit/b5a8ca7f7ff3dc5ec7126734447ad1451337b81d))
|
||||
|
||||
|
||||
### Documentation changes
|
||||
|
||||
* **command:** clean up the readme code example ([0811162](https://github.com/expo/expo-github-action/commit/0811162597bbb2719038d9bac02bd074a5d6d124))
|
||||
* update the release steps in the contribution guide ([b3b45ee](https://github.com/expo/expo-github-action/commit/b3b45ee53f1b6ce7e1db84a06047941fbea5c236))
|
||||
|
||||
## [7.1.1](https://github.com/expo/expo-github-action/compare/7.1.0...7.1.1) (2022-03-17)
|
||||
|
||||
|
||||
### Bug fixes
|
||||
|
||||
* package tool escape path on windows ([#169](https://github.com/expo/expo-github-action/issues/169)) ([db9b5ce](https://github.com/expo/expo-github-action/commit/db9b5ce00f55fe6dc5d802d41ffbd6c03cb598e4)), closes [#167](https://github.com/expo/expo-github-action/issues/167)
|
||||
|
||||
|
||||
### Other chores
|
||||
|
||||
* add tags syncing to the release workflow ([eb1ffb8](https://github.com/expo/expo-github-action/commit/eb1ffb8b234266a58d5fbfa1343e6fe6adfaf914))
|
||||
* fix dirty repo preventing tag bump ([7cde8f8](https://github.com/expo/expo-github-action/commit/7cde8f899a0771d310e1d62ee65ce3d625d470ea))
|
||||
|
||||
|
||||
### Documentation changes
|
||||
|
||||
* add direct link to expo access tokens ([1f38d16](https://github.com/expo/expo-github-action/commit/1f38d16d01677b6ed60d5358bdf23576538d578b))
|
||||
* increase visibility of the EXPO_TOKEN link ([#168](https://github.com/expo/expo-github-action/issues/168)) ([9fce70f](https://github.com/expo/expo-github-action/commit/9fce70f38003122ae997201dd07d4cc74830c24e))
|
||||
* **preview-comment:** update expo-cli version to latest ([4681fcf](https://github.com/expo/expo-github-action/commit/4681fcfc4247a28d47e8dfb17d23a9a0bff22827))
|
||||
* reword the assumptions on package manager ([459b567](https://github.com/expo/expo-github-action/commit/459b5673d55573b6e620015864c95b6b007f2f5f))
|
||||
|
||||
## [7.1.0](https://github.com/expo/expo-github-action/compare/7.0.3...7.1.0) (2022-03-04)
|
||||
|
||||
|
||||
@@ -13,7 +85,7 @@
|
||||
* skip steps if auth is unavailable ([bb7c723](https://github.com/expo/expo-github-action/commit/bb7c72336b557c49ca0a0e84025e1b4cce23ce2e))
|
||||
* update github action author name ([#166](https://github.com/expo/expo-github-action/issues/166)) ([520d959](https://github.com/expo/expo-github-action/commit/520d9594e099c7b2475d8b376303466a187bcafa))
|
||||
|
||||
### [7.0.3](https://github.com/expo/expo-github-action/compare/7.0.2...7.0.3) (2022-02-14)
|
||||
## [7.0.3](https://github.com/expo/expo-github-action/compare/7.0.2...7.0.3) (2022-02-14)
|
||||
|
||||
|
||||
### Bug fixes
|
||||
@@ -33,14 +105,14 @@
|
||||
|
||||
* simplify expo cli versioning to latest ([#161](https://github.com/expo/expo-github-action/issues/161)) ([2e1fe6a](https://github.com/expo/expo-github-action/commit/2e1fe6ac53c6fd536ea5691410d73df35384fd07))
|
||||
|
||||
### [7.0.2](https://github.com/expo/expo-github-action/compare/7.0.1...7.0.2) (2022-01-25)
|
||||
## [7.0.2](https://github.com/expo/expo-github-action/compare/7.0.1...7.0.2) (2022-01-25)
|
||||
|
||||
|
||||
### Code changes
|
||||
|
||||
* **preview-comment:** auto-fill the github token ([#156](https://github.com/expo/expo-github-action/issues/156)) ([204dfed](https://github.com/expo/expo-github-action/commit/204dfed23cb6416041ee5c918c7a6e3a5dbf8955))
|
||||
|
||||
### [7.0.1](https://github.com/expo/expo-github-action/compare/7.0.0...7.0.1) (2022-01-17)
|
||||
## [7.0.1](https://github.com/expo/expo-github-action/compare/7.0.0...7.0.1) (2022-01-17)
|
||||
|
||||
|
||||
### Bug fixes
|
||||
@@ -151,7 +223,7 @@
|
||||
* update readme for v6 release ([#101](https://github.com/expo/expo-github-action/issues/101)) ([8b43bae](https://github.com/expo/expo-github-action/commit/8b43bae073f280d4fa76aa174642ad46febe985c))
|
||||
* update upstream reference in contributing guide ([76ce4de](https://github.com/expo/expo-github-action/commit/76ce4de80ea89b343404cdabadc922882af80487))
|
||||
|
||||
### [5.5.1](https://github.com/expo/expo-github-action/compare/5.5.0...5.5.1) (2021-06-17)
|
||||
## [5.5.1](https://github.com/expo/expo-github-action/compare/5.5.0...5.5.1) (2021-06-17)
|
||||
|
||||
|
||||
### Bug fixes
|
||||
|
||||
+4
-2
@@ -45,9 +45,9 @@ To get your PR merged as fast as possible, please make sure you have done the fo
|
||||
|
||||
## 🚀 Releasing a new version
|
||||
|
||||
To release a new version for GitHub Actions, we have to create a new release in GitHub. You can run the `Release` workflow to generate a new version, changelog, and GitHub release.
|
||||
To release a new version for GitHub Actions, we have to create a new release in GitHub. You can run the `Release` workflow to generate a new version, changelog, and GitHub release.
|
||||
|
||||
After the exact version tag is created, update the `v{major}` tag to the latest major version. Make sure you are on the default branch at the commit of versioning.
|
||||
That workflow also bumps up the major version tag, like `v7`. In cases of failure, you could run this manually.
|
||||
|
||||
```bash
|
||||
$ git checkout main
|
||||
@@ -55,3 +55,5 @@ $ git fetch --tags && git pull
|
||||
$ git tag --force v{major}
|
||||
$ git push --force --tags
|
||||
```
|
||||
|
||||
When the release is fully tagged and ready, we still need to submit it to the marketplace. You can do that by editing the published version on [GitHub's release page](https://github.com/expo/expo-github-action/releases). Just saving it again notifies the marketplace of the new version.
|
||||
@@ -1,28 +1,35 @@
|
||||
<div align="center">
|
||||
<h1>expo-github-action</h1>
|
||||
<p>Publish, build or manage your <a href="https://github.com/expo/expo">Expo</a> app with GitHub Actions!</p>
|
||||
<p>
|
||||
<a href="https://github.com/expo/expo-github-action/releases">
|
||||
<img src="https://img.shields.io/github/v/release/expo/expo-github-action" alt="releases" />
|
||||
</a>
|
||||
<a href="https://github.com/expo/expo-github-action/actions">
|
||||
<img src="https://img.shields.io/github/workflow/status/expo/expo-github-action/test" alt="builds" />
|
||||
</a>
|
||||
<a href="https://github.com/expo/expo-github-action/blob/main/LICENSE.md">
|
||||
<img src="https://img.shields.io/github/license/expo/expo-github-action" alt="license" />
|
||||
</a>
|
||||
</p>
|
||||
<p align="center">
|
||||
<a href="#configuration-options"><b>Usage</b></a>
|
||||
—
|
||||
<a href="#example-workflows"><b>Examples</b></a>
|
||||
—
|
||||
<a href="#things-to-know"><b>Caveats</b></a>
|
||||
—
|
||||
<a href="/blob/main/CHANGELOG.md"><b>Changelog</b></a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/expo/expo-github-action/releases" title="Latest release">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/package-json/v/expo/expo-github-action?style=flat-square&color=0366D6&labelColor=49505A">
|
||||
<img alt="Latest release" src="https://img.shields.io/github/package-json/v/expo/expo-github-action?style=flat-square&color=0366D6&labelColor=D1D5DA" />
|
||||
</picture>
|
||||
</a>
|
||||
<a href="https://github.com/expo/expo-github-action/actions" title="Workflow status">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/actions/workflow/status/expo/expo-github-action/test.yml?branch=main&style=flat-square&labelColor=49505A">
|
||||
<img alt="Workflow status" src="https://img.shields.io/github/actions/workflow/status/expo/expo-github-action/test.yml?branch=main&style=flat-square&labelColor=D1D5DA" />
|
||||
</picture>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="#configuration-options"><b>Usage</b></a>
|
||||
—
|
||||
<a href="#example-workflows"><b>Examples</b></a>
|
||||
—
|
||||
<a href="#things-to-know"><b>Caveats</b></a>
|
||||
—
|
||||
<a href="/blob/main/CHANGELOG.md"><b>Changelog</b></a>
|
||||
</p>
|
||||
|
||||
<br />
|
||||
|
||||
## What's inside?
|
||||
|
||||
With this Expo action, you have full access to [Expo CLI][link-expo-cli] and [EAS CLI][link-eas-cli].
|
||||
@@ -31,6 +38,8 @@ Some additional features are included to make the usage of this action as simple
|
||||
|
||||
## Configuration options
|
||||
|
||||
> Create your [`EXPO_TOKEN`][link-expo-token] GitHub secret.
|
||||
|
||||
This action is customizable through variables defined in the [`action.yml`](action.yml).
|
||||
Here is a summary of all the input options you can use.
|
||||
|
||||
@@ -41,7 +50,7 @@ Here is a summary of all the input options you can use.
|
||||
| **eas-version** | - | EAS CLI version to install _(skips when omitted)_ |
|
||||
| **eas-cache** | `true` | If it should use the GitHub actions cache ([read more](#using-the-built-in-cache)) |
|
||||
| **packager** | `yarn` | Package manager to use _(e.g. `yarn` or `npm`)_ |
|
||||
| **token** | - | Token of your Expo account _(only use with [secrets][link-actions-secrets])_ |
|
||||
| **token** | - | Token of your Expo account - [get your token][link-expo-token] _(use with [secrets][link-actions-secrets])_ |
|
||||
| **patch-watchers** | `true` | If it should patch the `fs.inotify.*` limits on Ubuntu ([read more](#enospc-errors-on-linux)) |
|
||||
|
||||
## Example workflows
|
||||
@@ -56,7 +65,7 @@ You can read more about this in the [GitHub Actions documentation][link-actions]
|
||||
### Publish on any push to main
|
||||
|
||||
This workflow listens to the `push` event on the `main` branch.
|
||||
It sets up all required components to publish the app, including authentication with a token.
|
||||
It sets up all required components to publish the app, including authentication with a [token][link-expo-token].
|
||||
|
||||
> Always use [secrets][link-actions-secrets] when using tokens.
|
||||
|
||||
@@ -70,10 +79,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 🏗 Setup repo
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 🏗 Setup Node
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.x
|
||||
cache: yarn
|
||||
@@ -97,7 +106,7 @@ This action also allows you to install the EAS CLI.
|
||||
To do this, add the **eas-version** property, and the action will install it.
|
||||
We recommend using `latest` for the EAS CLI.
|
||||
|
||||
> The **token** is shared for both Expo and EAS CLI.
|
||||
> The [**token**][link-expo-token] is shared for both Expo and EAS CLI.
|
||||
|
||||
```yml
|
||||
on:
|
||||
@@ -109,10 +118,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 🏗 Setup repo
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 🏗 Setup Node
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.x
|
||||
cache: yarn
|
||||
@@ -133,7 +142,7 @@ jobs:
|
||||
|
||||
### Publish a preview from PR
|
||||
|
||||
Reviewing pull requests can take some time.
|
||||
Reviewing pull requests can take some time.
|
||||
The reviewer needs to check out the branch, install the changes, and run the bundler to review the results.
|
||||
You can also automatically publish the project for the reviewer to skip those manual steps.
|
||||
|
||||
@@ -148,10 +157,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 🏗 Setup repo
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 🏗 Setup Node
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.x
|
||||
cache: yarn
|
||||
@@ -178,24 +187,24 @@ jobs:
|
||||
|
||||
### Automatic Expo login
|
||||
|
||||
Some Expo commands, like `expo publish` and `eas build`, require you to be authenticated.
|
||||
This action exports the **token** to ensure you are authenticated in every workflow step.
|
||||
Some Expo commands, like `expo publish` and `eas build`, require you to be authenticated.
|
||||
This action exports the [**token**][link-expo-token] to ensure you are authenticated in every workflow step.
|
||||
|
||||
> Note, this action does not store the token anywhere. Each separate workflow job needs to set up the **token** individually.
|
||||
> Note, this action does not store the [token][link-expo-token] anywhere. Each separate workflow job needs to set up the [**token**][link-expo-token] individually.
|
||||
|
||||
### Using the built-in cache
|
||||
|
||||
You can opt-out from caching the Expo and EAS CLI installations.
|
||||
Under the hood, it uses the [`@actions/cache`][link-actions-cache-package] package to restore a previous install.
|
||||
Under the hood, it uses the [`@actions/cache`][link-actions-cache-package] package to restore a previous install.
|
||||
It reduces the installation time because it only needs to download and extract a single tar file.
|
||||
|
||||
> Note, using cache will count towards your [repo cache limit][link-actions-cache-limit]. Both the Expo and EAS CLI are stored in different caches.
|
||||
|
||||
### ENOSPC errors on Linux
|
||||
|
||||
Creating new bundles with Metro can be memory intensive.
|
||||
In the past, some builds resulted in `ENOSPC` errors.
|
||||
To prevent anyone from running into this, we make sure Ubuntu has sensible defaults in terms of file system availability.
|
||||
Creating new bundles with Metro can be memory intensive.
|
||||
In the past, some builds resulted in `ENOSPC` errors.
|
||||
To prevent anyone from running into this, we make sure Ubuntu has sensible defaults in terms of file system availability.
|
||||
You can opt-out from patching the file system by setting **patch-watchers** to `false`.
|
||||
|
||||
<div align="center">
|
||||
@@ -212,3 +221,4 @@ You can opt-out from patching the file system by setting **patch-watchers** to `
|
||||
[link-expo-release-channels]: https://docs.expo.dev/distribution/release-channels/
|
||||
[link-eas-cli]: https://github.com/expo/eas-cli#readme
|
||||
[link-preview-comment]: https://github.com/expo/expo-github-action/pull/149#issuecomment-1013184520
|
||||
[link-expo-token]: https://expo.dev/accounts/%5Baccount%5D/settings/access-tokens
|
||||
+20876
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,750 @@
|
||||
@actions/core
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright 2019 GitHub
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@actions/exec
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright 2019 GitHub
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@actions/github
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright 2019 GitHub
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@actions/http-client
|
||||
MIT
|
||||
Actions Http Client for Node.js
|
||||
|
||||
Copyright (c) GitHub, Inc.
|
||||
|
||||
All rights reserved.
|
||||
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
||||
associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
@actions/io
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright 2019 GitHub
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@actions/tool-cache
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright 2019 GitHub
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@octokit/auth-token
|
||||
MIT
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2019 Octokit contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
@octokit/core
|
||||
MIT
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2019 Octokit contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
@octokit/endpoint
|
||||
MIT
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2018 Octokit contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
@octokit/graphql
|
||||
MIT
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2018 Octokit contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
@octokit/plugin-paginate-rest
|
||||
MIT
|
||||
MIT License Copyright (c) 2019 Octokit contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
@octokit/plugin-rest-endpoint-methods
|
||||
MIT
|
||||
MIT License Copyright (c) 2019 Octokit contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
@octokit/request
|
||||
MIT
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2018 Octokit contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
@octokit/request-error
|
||||
MIT
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2019 Octokit contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
before-after-hook
|
||||
Apache-2.0
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2018 Gregor Martynus and other contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
deprecation
|
||||
ISC
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Gregor Martynus and contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
|
||||
encoding
|
||||
MIT
|
||||
Copyright (c) 2012-2014 Andris Reinman
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
||||
iconv-lite
|
||||
MIT
|
||||
Copyright (c) 2011 Alexander Shtuchkin
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
|
||||
is-plain-object
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
node-fetch
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 David Frank
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
||||
|
||||
once
|
||||
ISC
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
|
||||
safer-buffer
|
||||
MIT
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 Nikita Skovoroda <[email protected]>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
||||
semver
|
||||
ISC
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
|
||||
tr46
|
||||
MIT
|
||||
|
||||
tunnel
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2012 Koichi Kobayashi
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
universal-user-agent
|
||||
ISC
|
||||
# [ISC License](https://spdx.org/licenses/ISC)
|
||||
|
||||
Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m)
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
|
||||
uuid
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2010-2020 Robert Kieffer and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
webidl-conversions
|
||||
BSD-2-Clause
|
||||
# The BSD 2-Clause License
|
||||
|
||||
Copyright (c) 2014, Domenic Denicola
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
whatwg-url
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015–2016 Sebastian Mayr
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
wrappy
|
||||
ISC
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
+7125
-2681
File diff suppressed because it is too large.
Load diff
@@ -681,25 +681,13 @@ uuid
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2010-2016 Robert Kieffer and other contributors
|
||||
Copyright (c) 2010-2020 Robert Kieffer and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
webidl-conversions
|
||||
|
||||
+25109
-19940
File diff suppressed because it is too large.
Load diff
+29
-16
@@ -270,6 +270,31 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
||||
@azure/core-util
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2020 Microsoft
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
||||
@azure/logger
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
@@ -1023,25 +1048,13 @@ uuid
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2010-2016 Robert Kieffer and other contributors
|
||||
Copyright (c) 2010-2020 Robert Kieffer and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
webidl-conversions
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
<div align="center">
|
||||
<h1>expo-github-action/command</h1>
|
||||
<p>Run <a href="https://github.com/expo/expo-cli">Expo CLI</a> or <a href="https://github.com/expo/eas-cli">EAS CLI</a> command by a comment on the PR</p>
|
||||
</div>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/expo/expo-github-action/releases" title="Latest release">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/package-json/v/expo/expo-github-action?style=flat-square&color=0366D6&labelColor=49505A">
|
||||
<img alt="Latest release" src="https://img.shields.io/github/package-json/v/expo/expo-github-action?style=flat-square&color=0366D6&labelColor=D1D5DA" />
|
||||
</picture>
|
||||
</a>
|
||||
<a href="https://github.com/expo/expo-github-action/actions" title="Workflow status">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/actions/workflow/status/expo/expo-github-action/test.yml?branch=main&style=flat-square&labelColor=49505A">
|
||||
<img alt="Workflow status" src="https://img.shields.io/github/actions/workflow/status/expo/expo-github-action/test.yml?branch=main&style=flat-square&labelColor=D1D5DA" />
|
||||
</picture>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="#configuration-options"><b>Usage</b></a>
|
||||
—
|
||||
<a href="#example-workflows"><b>Examples</b></a>
|
||||
—
|
||||
<a href="#things-to-know"><b>Caveats</b></a>
|
||||
—
|
||||
<a href="https://github.com/expo/expo-github-action/blob/main/CHANGELOG.md"><b>Changelog</b></a>
|
||||
</p>
|
||||
|
||||
<br />
|
||||
|
||||
> **Warning**
|
||||
> This sub action is experimental and might change without notice. Use it at your own risk
|
||||
|
||||
## Configuration options
|
||||
|
||||
This action is customizable through variables defined in the [`action.yml`](action.yml).
|
||||
Here is a summary of all the input options you can use.
|
||||
|
||||
| variable | default | description |
|
||||
| ---------------- | -------------- | ------------------------------------------------------------------------- |
|
||||
| **github-token** | `github.token` | A GitHub token to use when commenting on PR ([read more](#github-tokens)) |
|
||||
|
||||
## Example workflows
|
||||
|
||||
Before diving 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].
|
||||
|
||||
### Run the `eas build` command via an issue comment
|
||||
|
||||
This workflow listens to the `issue_comment` event and run the `eas build` command to start a build at Expo.
|
||||
|
||||
```yml
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created, edited]
|
||||
concurrency:
|
||||
# Limit the max concurrency to only 1 active action per pull
|
||||
group: expo-bot-${{ github.event.issue.number }}
|
||||
cancel-in-progress: true
|
||||
jobs:
|
||||
bot:
|
||||
runs-on: ubuntu-latest
|
||||
# Only trigger from comments on pulls
|
||||
if: ${{ github.event.issue.pull_request }}
|
||||
# Allow the bot to comment on pulls
|
||||
permissions:
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: 🏗 Setup repo
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
# Checkout the repo on the pull
|
||||
ref: refs/pull/${{ github.event.issue.number }}/merge
|
||||
|
||||
- name: 🏗 Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.x
|
||||
cache: yarn
|
||||
|
||||
- name: 🏗 Setup Expo
|
||||
uses: expo/expo-github-action@v7
|
||||
with:
|
||||
eas-version: latest
|
||||
expo-version: latest
|
||||
token: ${{ secrets.EXPO_TOKEN }}
|
||||
|
||||
- name: 📦 Install dependencies
|
||||
run: yarn install
|
||||
|
||||
- name: 🤖 Run expo bot
|
||||
uses: expo/expo-github-action/command@v7
|
||||
```
|
||||
|
||||
## Things to know
|
||||
|
||||
### GitHub tokens
|
||||
|
||||
When using the GitHub API, you always need to be authenticated.
|
||||
This action tries to auto-authenticate using the [Automatic token authentication][link-gha-token] from GitHub.
|
||||
You can overwrite the token by adding the `GITHUB_TOKEN` environment variable, or add the **github-token** input.
|
||||
|
||||
[link-actions]: https://help.github.com/en/categories/automating-your-workflow-with-github-actions
|
||||
[link-gha-token]: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
name: Expo GitHub Action - Command
|
||||
author: Expo
|
||||
description: Run Expo CLI/EAS CLI command when a comment is added to a GitHub Pull Request.
|
||||
branding:
|
||||
icon: message-circle
|
||||
color: gray-dark
|
||||
runs:
|
||||
using: node16
|
||||
main: ../build/command/index.js
|
||||
inputs:
|
||||
github-token:
|
||||
description: GitHub access token to comment on PRs
|
||||
required: false
|
||||
default: ${{ github.token }}
|
||||
+39
-24
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "expo-github-action",
|
||||
"version": "7.1.0",
|
||||
"version": "7.2.1",
|
||||
"description": "Expo CLI in your GitHub Actions workflow",
|
||||
"main": "build/index.js",
|
||||
"repository": {
|
||||
@@ -18,34 +18,49 @@
|
||||
"test": "jest",
|
||||
"lint": "eslint .",
|
||||
"build": "node ncc.js",
|
||||
"clean": "rimraf build"
|
||||
"clean": "git clean -xdf ./build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@actions/cache": "^1.0.8",
|
||||
"@actions/core": "^1.6.0",
|
||||
"@actions/exec": "^1.1.0",
|
||||
"@actions/github": "^5.0.0",
|
||||
"@actions/io": "^1.1.1",
|
||||
"@actions/tool-cache": "^1.7.1"
|
||||
"@actions/cache": "^3.1.2",
|
||||
"@actions/core": "^1.10.0",
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/github": "^5.1.1",
|
||||
"@actions/io": "^1.1.2",
|
||||
"@actions/tool-cache": "^2.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@semantic-release/changelog": "^6.0.1",
|
||||
"@semantic-release/changelog": "^6.0.2",
|
||||
"@semantic-release/exec": "^6.0.3",
|
||||
"@semantic-release/git": "^10.0.1",
|
||||
"@tsconfig/node16": "^1.0.2",
|
||||
"@types/jest": "^27.4.0",
|
||||
"@types/node": "^16.11.19",
|
||||
"@typescript-eslint/eslint-plugin": "^5.9.1",
|
||||
"@typescript-eslint/parser": "^5.9.1",
|
||||
"@vercel/ncc": "^0.33.1",
|
||||
"conventional-changelog-conventionalcommits": "^4.6.3",
|
||||
"eslint": "^8.6.0",
|
||||
"eslint-config-universe": "^10.0.0",
|
||||
"jest": "^27.4.7",
|
||||
"prettier": "^2.5.1",
|
||||
"rimraf": "^3.0.2",
|
||||
"semantic-release": "^18.0.1",
|
||||
"ts-jest": "^27.1.2",
|
||||
"typescript": "^4.5.4"
|
||||
"@tsconfig/node16": "^1.0.3",
|
||||
"@types/jest": "^29.2.5",
|
||||
"@types/node": "^16.18.11",
|
||||
"@typescript-eslint/eslint-plugin": "^5.48.0",
|
||||
"@typescript-eslint/parser": "^5.48.0",
|
||||
"@vercel/ncc": "^0.36.0",
|
||||
"conventional-changelog-conventionalcommits": "^5.0.0",
|
||||
"eslint": "^8.31.0",
|
||||
"eslint-config-universe": "^11.1.1",
|
||||
"jest": "^29.3.1",
|
||||
"prettier": "^2.8.1",
|
||||
"semantic-release": "^19.0.5",
|
||||
"ts-jest": "^29.0.3",
|
||||
"typescript": "^4.9.4"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "universe/node",
|
||||
"ignorePatterns": [
|
||||
"build/**",
|
||||
"node_modules/**"
|
||||
]
|
||||
},
|
||||
"prettier": {
|
||||
"printWidth": 120,
|
||||
"tabWidth": 2,
|
||||
"singleQuote": true,
|
||||
"bracketSameLine": true,
|
||||
"trailingComma": "es5",
|
||||
"arrowParens": "avoid",
|
||||
"endOfLine": "auto"
|
||||
}
|
||||
}
|
||||
+42
-31
@@ -1,30 +1,37 @@
|
||||
<div align="center">
|
||||
<h1>expo-github-action/preview-comment</h1>
|
||||
<p>Add <a href="https://github.com/expo/expo">Expo</a> preview comments to pull requests</p>
|
||||
<p>
|
||||
<a href="https://github.com/expo/expo-github-action/releases">
|
||||
<img src="https://img.shields.io/github/v/release/expo/expo-github-action" alt="releases" />
|
||||
</a>
|
||||
<a href="https://github.com/expo/expo-github-action/actions">
|
||||
<img src="https://img.shields.io/github/workflow/status/expo/expo-github-action/test" alt="builds" />
|
||||
</a>
|
||||
<a href="https://github.com/expo/expo-github-action/blob/main/LICENSE.md">
|
||||
<img src="https://img.shields.io/github/license/expo/expo-github-action" alt="license" />
|
||||
</a>
|
||||
</p>
|
||||
<p align="center">
|
||||
<a href="#configuration-options"><b>Usage</b></a>
|
||||
—
|
||||
<a href="#available-outputs"><b>Outputs</b></a>
|
||||
—
|
||||
<a href="#example-workflows"><b>Examples</b></a>
|
||||
—
|
||||
<a href="#things-to-know"><b>Caveats</b></a>
|
||||
—
|
||||
<a href="https://github.com/expo/expo-github-action/blob/main/CHANGELOG.md"><b>Changelog</b></a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/expo/expo-github-action/releases" title="Latest release">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/package-json/v/expo/expo-github-action?style=flat-square&color=0366D6&labelColor=49505A">
|
||||
<img alt="Latest release" src="https://img.shields.io/github/package-json/v/expo/expo-github-action?style=flat-square&color=0366D6&labelColor=D1D5DA" />
|
||||
</picture>
|
||||
</a>
|
||||
<a href="https://github.com/expo/expo-github-action/actions" title="Workflow status">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/actions/workflow/status/expo/expo-github-action/test.yml?branch=main&style=flat-square&labelColor=49505A">
|
||||
<img alt="Workflow status" src="https://img.shields.io/github/actions/workflow/status/expo/expo-github-action/test.yml?branch=main&style=flat-square&labelColor=D1D5DA" />
|
||||
</picture>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="#configuration-options"><b>Usage</b></a>
|
||||
—
|
||||
<a href="#available-outputs"><b>Outputs</b></a>
|
||||
—
|
||||
<a href="#example-workflows"><b>Examples</b></a>
|
||||
—
|
||||
<a href="#things-to-know"><b>Caveats</b></a>
|
||||
—
|
||||
<a href="https://github.com/expo/expo-github-action/blob/main/CHANGELOG.md"><b>Changelog</b></a>
|
||||
</p>
|
||||
|
||||
<br />
|
||||
|
||||
## What's inside?
|
||||
|
||||
This (sub)action allows you to comment on pull requests containing Expo QR codes.
|
||||
@@ -48,8 +55,8 @@ Here is a summary of all the input options you can use.
|
||||
|
||||
## Available outputs
|
||||
|
||||
There are a few variables available to generate the comment content.
|
||||
Some of these variables are also exported as subaction output.
|
||||
There are a few variables available to generate the comment content.
|
||||
Some of these variables are also exported as subaction output.
|
||||
Here is a summary of these variables.
|
||||
|
||||
| output name | template name | description |
|
||||
@@ -85,12 +92,14 @@ on:
|
||||
jobs:
|
||||
preview:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: write # Allow comments on PRs
|
||||
steps:
|
||||
- name: 🏗 Setup repo
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 🏗 Setup Node
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.x
|
||||
cache: yarn
|
||||
@@ -98,7 +107,7 @@ jobs:
|
||||
- name: 🏗 Setup Expo
|
||||
uses: expo/expo-github-action@v7
|
||||
with:
|
||||
expo-version: 5.x
|
||||
expo-version: latest
|
||||
token: ${{ secrets.EXPO_TOKEN }}
|
||||
|
||||
- name: 📦 Install dependencies
|
||||
@@ -115,7 +124,7 @@ jobs:
|
||||
|
||||
### Sending preview comments elsewhere
|
||||
|
||||
You can also use this action to generate the comment without actually commenting.
|
||||
You can also use this action to generate the comment without actually commenting.
|
||||
By disabling commenting with **comment** set to `false`, you can reuse this action with any workflow trigger and send it to any service accessible in GitHub Actions.
|
||||
|
||||
> See [Available variables](#available-variables) for a list of all outputs.
|
||||
@@ -128,12 +137,14 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: write # Allow comments on PRs
|
||||
steps:
|
||||
- name: 🏗 Setup repo
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 🏗 Setup Node
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.x
|
||||
cache: yarn
|
||||
@@ -170,7 +181,7 @@ jobs:
|
||||
|
||||
### Preventing duplicate comments
|
||||
|
||||
When automating these preview comments, you have to be careful not to spam a pull request on every successful run.
|
||||
When automating these preview comments, you have to be careful not to spam a pull request on every successful run.
|
||||
Every comment contains a generated **message-id** to identify previously made comments and update instead of creating a new comment.
|
||||
|
||||
### GitHub tokens
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
import { getInput, info, setFailed } from '@actions/core';
|
||||
|
||||
import {
|
||||
appPlatformDisplayNames,
|
||||
appPlatformEmojis,
|
||||
BuildInfo,
|
||||
easBuild,
|
||||
getBuildLogsUrl,
|
||||
parseCommand,
|
||||
projectInfo,
|
||||
projectOwner,
|
||||
} from '../expo';
|
||||
import { createIssueComment, createReaction, issueComment, Reaction } from '../github';
|
||||
import { template } from '../utils';
|
||||
import { executeAction } from '../worker';
|
||||
|
||||
export const MESSAGE_ID = `app:@{projectOwner}/{projectSlug} {cli} {cmdName}`;
|
||||
|
||||
export function commandInput() {
|
||||
return {
|
||||
reaction: '+1' as Reaction['content'],
|
||||
githubToken: getInput('github-token'),
|
||||
};
|
||||
}
|
||||
|
||||
executeAction(commandAction);
|
||||
|
||||
export async function commandAction(input = commandInput()) {
|
||||
const [comment, context] = issueComment();
|
||||
if (!comment) {
|
||||
return;
|
||||
}
|
||||
|
||||
const command = parseCommand(comment);
|
||||
if (!command) {
|
||||
info("Comment didn't contain a valid expo/eas command");
|
||||
return;
|
||||
}
|
||||
|
||||
const cmdName = command.args[0];
|
||||
if (command.cli !== 'eas' || cmdName !== 'build') {
|
||||
setFailed(`We don't support \`${command.cli} ${cmdName}\` yet`);
|
||||
await createIssueComment({
|
||||
...context,
|
||||
token: input.githubToken,
|
||||
id: `${context.comment_id ?? context.number}`,
|
||||
body: createHelpComment({
|
||||
input: comment,
|
||||
buildProfiles: [],
|
||||
}),
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (input.reaction) {
|
||||
await createReaction({
|
||||
...context,
|
||||
token: input.githubToken,
|
||||
content: input.reaction,
|
||||
});
|
||||
}
|
||||
|
||||
const project = await projectInfo('');
|
||||
if (!project.owner) {
|
||||
project.owner = await projectOwner();
|
||||
}
|
||||
const variables: Record<string, string> = {
|
||||
projectName: project.name,
|
||||
projectOwner: project.owner || '',
|
||||
projectSlug: project.slug,
|
||||
cli: command.cli,
|
||||
cmdName,
|
||||
};
|
||||
|
||||
const messageId = template(MESSAGE_ID, variables);
|
||||
const result = await easBuild(command);
|
||||
await createIssueComment({
|
||||
...context,
|
||||
token: input.githubToken,
|
||||
id: messageId,
|
||||
body: createBuildComment(result),
|
||||
});
|
||||
}
|
||||
|
||||
type HelpCommentInput = {
|
||||
input: string;
|
||||
buildProfiles: string[];
|
||||
};
|
||||
|
||||
function createHelpComment(input: HelpCommentInput) {
|
||||
const buildArgs = ['build'];
|
||||
if (input.buildProfiles.length) {
|
||||
buildArgs.push(`--profile <${input.buildProfiles.join('|')}>`);
|
||||
}
|
||||
return [
|
||||
`> ${input.input}`,
|
||||
'',
|
||||
`I didn't recognize your command, please retry with one of the commands below.`,
|
||||
createDetails({
|
||||
summary: 'Available commands',
|
||||
details: [
|
||||
'### EAS-CLI',
|
||||
`- \`eas ${buildArgs.join(' ')}\` start a build.`,
|
||||
// '',
|
||||
// '### EXPO-CLI',
|
||||
// '- `expo publish` deploy a project to Expo hosting',
|
||||
].join('\n'),
|
||||
}),
|
||||
].join('\n');
|
||||
}
|
||||
|
||||
function createDetails({ summary, details }: { summary: string; details: string }): string {
|
||||
return `<details><summary>${summary}</summary>\n\n${details}\n</details>`;
|
||||
}
|
||||
|
||||
function createBuildComment(builds: BuildInfo[]) {
|
||||
const buildLinks = builds.map(
|
||||
build =>
|
||||
` ${appPlatformEmojis[build.platform]} [${
|
||||
appPlatformDisplayNames[build.platform]
|
||||
} build details](${getBuildLogsUrl(build)}) `
|
||||
);
|
||||
|
||||
const firstBuild = builds[0];
|
||||
return [
|
||||
`Commit ${firstBuild.gitCommitHash} is building...`,
|
||||
'',
|
||||
`|${buildLinks.join('|')}|`,
|
||||
`|${Array(buildLinks.length).fill(':-:').join('|')}`,
|
||||
'',
|
||||
createDetails({
|
||||
summary: 'Build Details',
|
||||
details: [
|
||||
'## Summary',
|
||||
'',
|
||||
`- **Distribution**: \`${firstBuild.distribution}\``,
|
||||
`- **Build profile**: \`${firstBuild.buildProfile}\``,
|
||||
`- **SDK version**: \`${firstBuild.sdkVersion}\``,
|
||||
`- **App version**: \`${firstBuild.appVersion}\``,
|
||||
`- **Release channel**: \`${firstBuild.appVersion}\``,
|
||||
].join('\n'),
|
||||
}),
|
||||
].join('\n');
|
||||
}
|
||||
@@ -2,10 +2,9 @@ import { getBooleanInput, getInput, setOutput, info } from '@actions/core';
|
||||
|
||||
import { projectDeepLink, projectInfo, projectLink, projectOwner, projectQR } from '../expo';
|
||||
import { createIssueComment, pullContext } from '../github';
|
||||
import { template } from '../utils';
|
||||
import { executeAction } from '../worker';
|
||||
|
||||
export type CommentInput = ReturnType<typeof commentInput>;
|
||||
|
||||
export const DEFAULT_ID = `app:@{projectOwner}/{projectSlug} channel:{channel}`;
|
||||
export const DEFAULT_MESSAGE =
|
||||
`This pull request was automatically deployed using [Expo GitHub Actions](https://github.com/expo/expo-github-action/tree/main/preview-comment)!\n` +
|
||||
@@ -26,7 +25,7 @@ export function commentInput() {
|
||||
|
||||
executeAction(commentAction);
|
||||
|
||||
export async function commentAction(input: CommentInput = commentInput()) {
|
||||
export async function commentAction(input = commentInput()) {
|
||||
const project = await projectInfo(input.project);
|
||||
if (!project.owner) {
|
||||
project.owner = await projectOwner();
|
||||
@@ -63,11 +62,3 @@ export async function commentAction(input: CommentInput = commentInput()) {
|
||||
setOutput('messageId', messageId);
|
||||
setOutput('message', messageBody);
|
||||
}
|
||||
|
||||
function template(template: string, replacements: Record<string, string>) {
|
||||
let result = template;
|
||||
for (const name in replacements) {
|
||||
result = result.replaceAll(`{${name}}`, replacements[name]);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -5,8 +5,6 @@ import { authenticate } from '../expo';
|
||||
import { installPackage, resolvePackage } from '../packager';
|
||||
import { executeAction, findTool, installToolFromPackage, patchWatchers } from '../worker';
|
||||
|
||||
export type SetupInput = ReturnType<typeof setupInput>;
|
||||
|
||||
export function setupInput() {
|
||||
return {
|
||||
easCache: !getInput('eas-cache') || getBooleanInput('eas-cache'),
|
||||
@@ -21,7 +19,7 @@ export function setupInput() {
|
||||
|
||||
executeAction(setupAction);
|
||||
|
||||
export async function setupAction(input: SetupInput = setupInput()) {
|
||||
export async function setupAction(input = setupInput()) {
|
||||
if (!input.expoVersion) {
|
||||
info(`Skipped installing expo-cli: 'expo-version' not provided.`);
|
||||
} else {
|
||||
|
||||
+21
-4
@@ -1,9 +1,16 @@
|
||||
import { saveCache, restoreCache, ReserveCacheError } from '@actions/cache';
|
||||
import { saveCache, restoreCache, ReserveCacheError, isFeatureAvailable } from '@actions/cache';
|
||||
import { warning } from '@actions/core';
|
||||
import os from 'os';
|
||||
|
||||
import { toolPath } from './worker';
|
||||
|
||||
/**
|
||||
* Determine if the remote cache is available and can be used.
|
||||
*/
|
||||
export function cacheIsAvailable(): boolean {
|
||||
return isFeatureAvailable();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the exact cache key for the package.
|
||||
* We can prefix this when there are breaking changes in this action.
|
||||
@@ -18,6 +25,12 @@ export function cacheKey(name: string, version: string, manager: string): string
|
||||
*/
|
||||
export async function restoreFromCache(name: string, version: string, manager: string) {
|
||||
const dir = toolPath(name, version)!;
|
||||
|
||||
if (!cacheIsAvailable()) {
|
||||
warning(`Skipped restoring from remote cache, not available.`);
|
||||
return undefined;
|
||||
}
|
||||
|
||||
try {
|
||||
if (await restoreCache([dir], cacheKey(name, version, manager))) {
|
||||
return dir;
|
||||
@@ -32,6 +45,11 @@ export async function restoreFromCache(name: string, version: string, manager: s
|
||||
* This will fetch the tool from the local tool cache.
|
||||
*/
|
||||
export async function saveToCache(name: string, version: string, manager: string) {
|
||||
if (!cacheIsAvailable()) {
|
||||
warning(`Skipped saving to remote cache, not available.`);
|
||||
return undefined;
|
||||
}
|
||||
|
||||
try {
|
||||
await saveCache([toolPath(name, version)], cacheKey(name, version, manager));
|
||||
} catch (error) {
|
||||
@@ -48,11 +66,10 @@ export async function saveToCache(name: string, version: string, manager: string
|
||||
* - ReserveCacheError
|
||||
* - "cache service url not found"
|
||||
*/
|
||||
export function handleCacheError(error: Error): void {
|
||||
export function handleCacheError(error: Error | unknown): void {
|
||||
const isReserveCacheError = error instanceof ReserveCacheError;
|
||||
const isCacheUnavailable = error.message.toLowerCase().includes('cache service url not found');
|
||||
|
||||
if (isReserveCacheError || isCacheUnavailable) {
|
||||
if (isReserveCacheError) {
|
||||
warning('Skipped remote cache, encountered error:');
|
||||
warning(error.message);
|
||||
} else {
|
||||
|
||||
+103
-2
@@ -4,14 +4,74 @@ import { which } from '@actions/io';
|
||||
import { ok as assert } from 'assert';
|
||||
import { URL } from 'url';
|
||||
|
||||
import { errorMessage } from './utils';
|
||||
|
||||
export type CliName = 'expo' | 'eas';
|
||||
|
||||
export type Command = {
|
||||
cli: CliName;
|
||||
args: string[];
|
||||
raw: string;
|
||||
command: string;
|
||||
};
|
||||
|
||||
export interface ProjectInfo {
|
||||
name: string;
|
||||
slug: string;
|
||||
owner?: string;
|
||||
}
|
||||
|
||||
export enum AppPlatform {
|
||||
Android = 'ANDROID',
|
||||
Ios = 'IOS',
|
||||
}
|
||||
|
||||
export type BuildInfo = {
|
||||
id: string;
|
||||
platform: AppPlatform;
|
||||
project: {
|
||||
slug: string;
|
||||
ownerAccount: {
|
||||
name: string;
|
||||
};
|
||||
};
|
||||
releaseChannel: string;
|
||||
distribution: string;
|
||||
buildProfile: string;
|
||||
sdkVersion: string;
|
||||
appVersion: string;
|
||||
gitCommitHash: string;
|
||||
};
|
||||
|
||||
export const appPlatformDisplayNames: Record<AppPlatform, string> = {
|
||||
[AppPlatform.Android]: 'Android',
|
||||
[AppPlatform.Ios]: 'iOS',
|
||||
};
|
||||
|
||||
export const appPlatformEmojis = {
|
||||
[AppPlatform.Ios]: '🍎',
|
||||
[AppPlatform.Android]: '🤖',
|
||||
};
|
||||
|
||||
const CommandRegExp = /^#(eas|expo)\s+(.+)?$/im;
|
||||
|
||||
export function parseCommand(input: string): Command | null {
|
||||
const matches = CommandRegExp.exec(input);
|
||||
if (matches != null) {
|
||||
return {
|
||||
cli: matches[1] as CliName,
|
||||
raw: input.trimStart().substring(1).trim(),
|
||||
args:
|
||||
matches[2]
|
||||
?.split(' ')
|
||||
.map(s => s.trim())
|
||||
.filter(Boolean) ?? [],
|
||||
} as Command;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Try to authenticate the user using either Expo or EAS CLI.
|
||||
* This method tries to invoke 'whoami' to validate if the token is valid.
|
||||
@@ -38,7 +98,7 @@ export async function projectOwner(cli: CliName = 'expo'): Promise<string> {
|
||||
try {
|
||||
({ stdout } = await getExecOutput(await which(cli), ['whoami'], { silent: true }));
|
||||
} catch (error) {
|
||||
throw new Error(`Could not fetch the project owner, reason:\n${error.message | error}`);
|
||||
throw new Error(`Could not fetch the project owner, reason:\n${errorMessage(error)}`);
|
||||
}
|
||||
|
||||
if (!stdout) {
|
||||
@@ -50,6 +110,35 @@ export async function projectOwner(cli: CliName = 'expo'): Promise<string> {
|
||||
return stdout.trim();
|
||||
}
|
||||
|
||||
export async function runCommand(cmd: Command) {
|
||||
let stdout = '';
|
||||
let stderr = '';
|
||||
|
||||
try {
|
||||
({ stderr, stdout } = await getExecOutput(await which(cmd.cli), cmd.args.concat('--non-interactive'), {
|
||||
silent: false,
|
||||
}));
|
||||
} catch (error) {
|
||||
throw new Error(`Could not run command ${cmd.args.join(' ')}, reason:\n${errorMessage(error)}`);
|
||||
}
|
||||
|
||||
return [stdout.trim(), stderr.trim()];
|
||||
}
|
||||
|
||||
export async function easBuild(cmd: Command): Promise<BuildInfo[]> {
|
||||
let stdout = '';
|
||||
|
||||
try {
|
||||
const args = cmd.args.concat('--json', '--non-interactive', '--no-wait');
|
||||
({ stdout } = await getExecOutput(await which('eas', true), args, {
|
||||
silent: false,
|
||||
}));
|
||||
} catch (error) {
|
||||
throw new Error(`Could not run command eas build, reason:\n${errorMessage(error)}`);
|
||||
}
|
||||
|
||||
return JSON.parse(stdout);
|
||||
}
|
||||
/**
|
||||
* Try to resolve the project info, by running 'expo config --type prebuild'.
|
||||
*/
|
||||
@@ -62,7 +151,7 @@ export async function projectInfo(dir: string): Promise<ProjectInfo> {
|
||||
silent: true,
|
||||
}));
|
||||
} catch (error) {
|
||||
throw new Error(`Could not fetch the project info from ${dir}, reason:\n${error.message || error}`);
|
||||
throw new Error(`Could not fetch the project info from ${dir}, reason:\n${errorMessage(error)}`);
|
||||
}
|
||||
|
||||
const { name, slug, owner } = JSON.parse(stdout);
|
||||
@@ -112,3 +201,15 @@ export function projectDeepLink(project: ProjectInfo, channel?: string): string
|
||||
|
||||
return url.toString();
|
||||
}
|
||||
|
||||
export function getBuildLogsUrl(build: BuildInfo): string {
|
||||
// TODO: reuse this function from the original source
|
||||
// see: https://github.com/expo/eas-cli/blob/896f7f038582347c57dc700be9ea7d092b5a3a21/packages/eas-cli/src/build/utils/url.ts#L13-L21
|
||||
const { project } = build;
|
||||
const path = project
|
||||
? `/accounts/${project.ownerAccount.name}/projects/${project.slug}/builds/${build.id}`
|
||||
: `/builds/${build.id}`;
|
||||
|
||||
const url = new URL(path, 'https://expo.dev');
|
||||
return url.toString();
|
||||
}
|
||||
@@ -3,6 +3,10 @@ import { ok as assert } from 'assert';
|
||||
|
||||
type IssueContext = typeof context['issue'];
|
||||
|
||||
type IssueCommentContext = IssueContext & {
|
||||
comment_id?: number;
|
||||
};
|
||||
|
||||
type AuthContext = {
|
||||
/** GitHub token from the 'github-input' to authenticate with */
|
||||
token?: string;
|
||||
@@ -15,6 +19,10 @@ type Comment = {
|
||||
body: string;
|
||||
};
|
||||
|
||||
export type Reaction = {
|
||||
content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes';
|
||||
};
|
||||
|
||||
/**
|
||||
* Determine if a comment exists on an issue or pull with the provided identifier.
|
||||
* This will iterate all comments received from GitHub, and try to exit early if it exists.
|
||||
@@ -90,3 +98,37 @@ export function pullContext(): IssueContext {
|
||||
);
|
||||
return context.issue;
|
||||
}
|
||||
|
||||
export async function createReaction(options: AuthContext & IssueCommentContext & Reaction) {
|
||||
const github = githubApi(options);
|
||||
|
||||
if (options.comment_id) {
|
||||
return github.rest.reactions.createForIssueComment({
|
||||
owner: options.owner,
|
||||
repo: options.repo,
|
||||
comment_id: options.comment_id,
|
||||
content: options.content,
|
||||
});
|
||||
}
|
||||
|
||||
return github.rest.reactions.createForIssue({
|
||||
owner: options.owner,
|
||||
repo: options.repo,
|
||||
issue_number: options.number,
|
||||
content: options.content,
|
||||
});
|
||||
}
|
||||
|
||||
export function issueComment() {
|
||||
assert(
|
||||
context.eventName === 'issue_comment',
|
||||
'Could not find the issue comment context, make sure to run this from a issue_comment triggered workflow'
|
||||
);
|
||||
return [
|
||||
(context.payload?.comment?.body ?? '') as string,
|
||||
{
|
||||
...context.issue,
|
||||
comment_id: context.payload?.comment?.id,
|
||||
},
|
||||
] as const;
|
||||
}
|
||||
+8
-7
@@ -1,6 +1,7 @@
|
||||
import { exec, getExecOutput } from '@actions/exec';
|
||||
import { which, mkdirP } from '@actions/io';
|
||||
import { mkdirP } from '@actions/io';
|
||||
|
||||
import { errorMessage } from './utils';
|
||||
import { cacheTool, tempPath } from './worker';
|
||||
|
||||
/**
|
||||
@@ -14,7 +15,7 @@ export async function resolvePackage(name: string, range: string): Promise<strin
|
||||
try {
|
||||
({ stdout } = await getExecOutput('npm', ['info', `${name}@${range}`, 'version', '--json'], { silent: true }));
|
||||
} catch (error) {
|
||||
throw new Error(`Could not resolve ${name}@${range}, reason:\n${error.message || error}`);
|
||||
throw new Error(`Could not resolve ${name}@${range}, reason:\n${errorMessage(error)}`);
|
||||
}
|
||||
|
||||
// thanks npm, for returning a "" json string value for invalid versions
|
||||
@@ -31,16 +32,16 @@ export async function resolvePackage(name: string, range: string): Promise<strin
|
||||
}
|
||||
|
||||
/**
|
||||
* Install a module using a node package manager.
|
||||
* The installation is executed in a temporary folder.
|
||||
* After this is complete, it's "installed" into the worker's tool cache.
|
||||
* Install a module using a node package manager, inside a temporary directory.
|
||||
* If that's successful, move the module into the worker's tool cache.
|
||||
*
|
||||
* Note, we do assume that the packager is globally available AND has the `add <pkgspec>` command.
|
||||
*/
|
||||
export async function installPackage(name: string, version: string, manager: string) {
|
||||
const temp = tempPath(name, version);
|
||||
const tool = await which(manager);
|
||||
|
||||
await mkdirP(temp);
|
||||
await exec(tool, ['add', `${name}@${version}`], { cwd: temp });
|
||||
await exec(manager, ['add', `${name}@${version}`], { cwd: temp });
|
||||
|
||||
return cacheTool(temp, name, version);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Replace all template variables in a string.
|
||||
* This uses the notation of `{varname}`, which can be defined as object.
|
||||
*/
|
||||
export function template(template: string, replacements: Record<string, string>) {
|
||||
let result = template;
|
||||
for (const name in replacements) {
|
||||
result = result.replaceAll(`{${name}}`, replacements[name]);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
export function errorMessage(error: Error | unknown): string {
|
||||
if (error instanceof Error) {
|
||||
return error.message;
|
||||
}
|
||||
|
||||
if (typeof error === 'string') {
|
||||
return error;
|
||||
}
|
||||
|
||||
return 'Unknown error';
|
||||
}
|
||||
+3
-1
@@ -4,6 +4,8 @@ import { ok as assert } from 'assert';
|
||||
import os from 'os';
|
||||
import path from 'path';
|
||||
|
||||
import { errorMessage } from './utils';
|
||||
|
||||
export { find as findTool, cacheDir as cacheTool } from '@actions/tool-cache';
|
||||
|
||||
/**
|
||||
@@ -54,7 +56,7 @@ export async function patchWatchers(): Promise<void> {
|
||||
} catch (error) {
|
||||
warning(`Looks like we can't patch watchers/inotify limits, you might encouter the 'ENOSPC' error.`);
|
||||
warning('For more info: https://github.com/expo/expo-github-action/issues/20, encountered error:');
|
||||
warning(error.message);
|
||||
warning(errorMessage(error));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import * as core from '@actions/core';
|
||||
|
||||
import {
|
||||
CommentInput,
|
||||
commentInput,
|
||||
commentAction,
|
||||
DEFAULT_ID,
|
||||
DEFAULT_MESSAGE,
|
||||
} from '../../src/actions/preview-comment';
|
||||
import { commentInput, commentAction, DEFAULT_ID, DEFAULT_MESSAGE } from '../../src/actions/preview-comment';
|
||||
import * as expo from '../../src/expo';
|
||||
import * as github from '../../src/github';
|
||||
import { mockInput } from '../utils';
|
||||
@@ -55,7 +49,7 @@ describe(commentInput, () => {
|
||||
});
|
||||
|
||||
describe(commentAction, () => {
|
||||
const input: CommentInput = {
|
||||
const input: ReturnType<typeof commentInput> = {
|
||||
channel: 'default',
|
||||
comment: false,
|
||||
message: DEFAULT_MESSAGE,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as core from '@actions/core';
|
||||
|
||||
import { SetupInput, setupInput, setupAction } from '../../src/actions/setup';
|
||||
import { setupInput, setupAction } from '../../src/actions/setup';
|
||||
import * as cacher from '../../src/cacher';
|
||||
import * as expo from '../../src/expo';
|
||||
import * as packager from '../../src/packager';
|
||||
@@ -53,7 +53,7 @@ describe(setupInput, () => {
|
||||
});
|
||||
|
||||
describe(setupAction, () => {
|
||||
const input: SetupInput = {
|
||||
const input: ReturnType<typeof setupInput> = {
|
||||
easCache: false,
|
||||
easVersion: '',
|
||||
expoCache: false,
|
||||
|
||||
@@ -32,21 +32,25 @@ describe(cacheKey, () => {
|
||||
|
||||
describe(restoreFromCache, () => {
|
||||
it('skips when cache is unavailable', async () => {
|
||||
jest.mocked(cache.isFeatureAvailable).mockReturnValue(false);
|
||||
jest.mocked(cache.restoreCache).mockRejectedValue(new Error('Cache service url not found'));
|
||||
await expect(restoreFromCache('expo-cli', '5.0.3', 'yarn')).resolves.toBeUndefined();
|
||||
});
|
||||
|
||||
it('throws when cache has unexpected error', async () => {
|
||||
jest.mocked(cache.isFeatureAvailable).mockReturnValue(true);
|
||||
jest.mocked(cache.restoreCache).mockRejectedValue(new Error('Node registry is down'));
|
||||
await expect(restoreFromCache('expo-cli', '5.0.3', 'yarn')).rejects.toThrow('Node registry is down');
|
||||
});
|
||||
|
||||
it('returns expo-cli path from cache when available', async () => {
|
||||
jest.mocked(cache.isFeatureAvailable).mockReturnValue(true);
|
||||
jest.mocked(cache.restoreCache).mockResolvedValue('fake/path');
|
||||
await expect(restoreFromCache('expo-cli', '5.0.3', 'yarn')).resolves.toBe(toolPath('expo-cli', '5.0.3'));
|
||||
});
|
||||
|
||||
it('returns nothing when cache is empty', async () => {
|
||||
jest.mocked(cache.isFeatureAvailable).mockReturnValue(true);
|
||||
jest.mocked(cache.restoreCache).mockResolvedValue(undefined);
|
||||
await expect(restoreFromCache('eas-cli', '0.46.2', 'npm')).resolves.toBeUndefined();
|
||||
});
|
||||
@@ -54,16 +58,19 @@ describe(restoreFromCache, () => {
|
||||
|
||||
describe(saveToCache, () => {
|
||||
it('skips when cache is unavailable', async () => {
|
||||
jest.mocked(cache.isFeatureAvailable).mockReturnValue(false);
|
||||
jest.mocked(cache.saveCache).mockRejectedValue(new Error('Cache service url not found'));
|
||||
await expect(saveToCache('expo-cli', '5.0.3', 'yarn')).resolves.toBeUndefined();
|
||||
});
|
||||
|
||||
it('throws when cache has unexpected error', async () => {
|
||||
jest.mocked(cache.isFeatureAvailable).mockReturnValue(true);
|
||||
jest.mocked(cache.saveCache).mockRejectedValue(new Error('Node registry is down'));
|
||||
await expect(saveToCache('expo-cli', '5.0.3', 'yarn')).rejects.toThrow('Node registry is down');
|
||||
});
|
||||
|
||||
it('saves expo-cli to cache when available', async () => {
|
||||
jest.mocked(cache.isFeatureAvailable).mockReturnValue(true);
|
||||
jest.mocked(cache.saveCache).mockResolvedValue(1337);
|
||||
await expect(saveToCache('expo-cli', '5.0.3', 'yarn')).resolves.toBeUndefined();
|
||||
});
|
||||
|
||||
+19
-1
@@ -2,12 +2,30 @@ import * as core from '@actions/core';
|
||||
import * as exec from '@actions/exec';
|
||||
import * as io from '@actions/io';
|
||||
|
||||
import { authenticate, projectQR, projectLink, projectDeepLink } from '../src/expo';
|
||||
import { authenticate, projectQR, projectLink, projectDeepLink, parseCommand } from '../src/expo';
|
||||
|
||||
jest.mock('@actions/core');
|
||||
jest.mock('@actions/exec');
|
||||
jest.mock('@actions/io');
|
||||
|
||||
describe(parseCommand, () => {
|
||||
it('invalid command', async () => {
|
||||
expect(parseCommand('eas submit')).toBe(null);
|
||||
});
|
||||
it('#eas submit', async () => {
|
||||
expect(parseCommand('#eas submit')).toStrictEqual({
|
||||
raw: 'eas submit',
|
||||
cli: 'eas',
|
||||
args: ['submit'],
|
||||
});
|
||||
expect(parseCommand('#eas submit -p ios ')).toStrictEqual({
|
||||
raw: 'eas submit -p ios',
|
||||
cli: 'eas',
|
||||
args: ['submit', '-p', 'ios'],
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe(authenticate, () => {
|
||||
it('exports EXPO_TOKEN variable', async () => {
|
||||
await authenticate('faketoken', undefined);
|
||||
|
||||
+10
-11
@@ -1,13 +1,12 @@
|
||||
{
|
||||
"extends": "./node_modules/@tsconfig/node16/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./build",
|
||||
"rootDir": "./src",
|
||||
"useUnknownInCatchVariables": false
|
||||
},
|
||||
"exclude": [
|
||||
"build",
|
||||
"node_modules",
|
||||
"tests/**"
|
||||
]
|
||||
"extends": "@tsconfig/node16",
|
||||
"compilerOptions": {
|
||||
"outDir": "./build",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
"exclude": [
|
||||
"build",
|
||||
"node_modules",
|
||||
"tests/**"
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user