Skip to content

Commit

Permalink
add quickbit-native changes
Browse files Browse the repository at this point in the history
  • Loading branch information
achou11 committed Oct 11, 2023
1 parent d95bd4d commit 2517a9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 20 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/prebuilds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

env:
NODE_VERSION: 16
MODULE_NAME: "" # UPDATE THIS
MODULE_NAME: "quickbit-native"
MODULE_VERSION: ${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || 'latest' }}

jobs:
Expand All @@ -21,10 +21,6 @@ jobs:
target: ["android-arm", "android-arm64", "android-x64"]

steps:
- name: Assert env.MODULE_NAME is set
if: ${{ env.MODULE_NAME == '' }}
run: echo "env.MODULE_NAME must be set" && exit 1

- uses: actions/checkout@v4

- name: Setup NDK
Expand Down
17 changes: 2 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
# nodejs-mobile-prebuilds-template

Template repository for building and publishing [NodeJS Mobile](https://github.com/nodejs-mobile/nodejs-mobile) prebuilds for a specific module

## Getting started

1. Create a new repository from this template using the GitHub UI. Alternatively can fork it.
2. Update the environment variables defined in the [workflow file](./.github/workflows/prebuilds.yml) based on your needs:

- `NODE_VERSION`: the Node version to use for building (you most likely do not need to change this)
- `MODULE_NAME`: the name of the module that you're building prebuilds for
- `MODULE_VERSION`: the package version of the module that your'e building (you most likely do not need to change this)

3. Remove the [`Getting started`](#getting-started) section of this README! (since it's specific to the template repo)
# quickbit-native-nodejs-mobile

## Working locally

Expand All @@ -25,7 +12,7 @@ Template repository for building and publishing [NodeJS Mobile](https://github.c

Should be clear enough to follow the workflow steps but in summary:

1. Download the npm tarball package and unzip e.g. `npm pack foo@latest | xargs tar -zxvf` (replace `foo@latest` with the relevant package name and version)
1. Download the npm tarball package and unzip e.g. `npm pack quickbit-native@latest | xargs tar -zxvf`

2. Navigate to unzipped directory and run `npx prebuild-for-nodejs-mobile TARGET`, where `TARGET` is an accepted value from the [`prebuild-for-nodejs-mobile`](https://github.com/staltz/prebuild-for-nodejs-mobile) CLI
- if you don't have the `ANDROID_NDK_PATH` environment variable exported, you may run the command like so: `ANDROID_NDK_HOME=/path/to/ndk npx prebuild-for-nodejs-mobile TARGET`
Expand Down

0 comments on commit 2517a9a

Please sign in to comment.