-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit df4544f
Showing
14 changed files
with
12,365 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Don't lint node_modules | ||
node_modules | ||
|
||
# Don't lint build output | ||
dist | ||
build | ||
|
||
# Ignore eslintrc | ||
.eslintrc.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
root: true, | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint'], | ||
extends: ['airbnb-base', 'airbnb-typescript/base'], | ||
parserOptions: { | ||
project: ['./tsconfig.json'] | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.idea | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Emerge upload action | ||
|
||
Action to upload your build directly to Emerge for analysis. | ||
|
||
## Usage | ||
|
||
The Emerge upload action should be run on any event that should trigger a size analysis. Examples of this are: | ||
|
||
- When pushing to specific branches (main/release). | ||
- On any PR to the main branch. | ||
|
||
See [action.yml](https://github.com/EmergeTools/emerge-upload-action/blob/main/action.yml) for all inputs and | ||
descriptions. | ||
|
||
### Create Emerge API key and add to secrets | ||
|
||
First, create an Emerge API key. You can create one from your [Emerge profile page](https://www.emergetools.com/profile) | ||
. | ||
|
||
![Create Emerge API Key](./docs/api_key.png) | ||
|
||
Add the API key to your secrets in your repository. **Do not leave this key in plain text in your workflow!** | ||
|
||
[Learn more about creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets) | ||
|
||
### Incorporate in your workflow | ||
|
||
Build your artifact in a step before the Emerge upload action. Pass the generated artifact's path as the `artifact_path` | ||
argument: | ||
|
||
```yaml | ||
name: Your workflow | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Generate Android release bundle | ||
run: ./gradlew bundleRelease | ||
- name: Upload artifact to Emerge | ||
run: emerge-actions/emerge-upload@v1 | ||
with: | ||
artifact_path: ./app/build/outputs/bundle/release/app-release.aab | ||
emerge_api_key: ${{ secrets.EMERGE_API_KEY }} | ||
build_type: release # Optional, change if your workflow builds a specific type | ||
``` | ||
After uploading, Emerge will run analysis on the uploaded build. If you haven't, set up Github comments by following | ||
our [Github documentation](https://docs.emergetools.com/docs/github). | ||
For more details about the upload process and Emerge's supported artifact types, see | ||
the [Emerge Uploading docs](https://docs.emergetools.com/docs/uploading-basics). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: "Emerge Upload" | ||
description: "Github Action for uploading an artifact to Emerge." | ||
author: "EmergeTools" | ||
inputs: | ||
artifact_path: | ||
description: "Relative path from the location of the main workspace runner to the artifact generated in CI." | ||
required: true | ||
emerge_api_key: | ||
description: > | ||
Emerge API token used to access the Emerge API. You can generate | ||
an API key from your Profile page in the Emerge dashboard. | ||
[Learn more about generating an Emerge API key](https://docs.emergetools.com/docs/fastlane#obtain-an-api-key) | ||
Make sure to store this key using Github Action's encrypted secrets. | ||
[Learn more about creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets) | ||
required: true | ||
build_type: | ||
description: "The name for the build type (e.g. 'release', 'debug', 'beta')" | ||
required: false | ||
runs: | ||
using: 'node12' | ||
main: 'dist/index.js' |
Oops, something went wrong.