Skip to content

Commit

Permalink
update for node 18 workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
achou11 committed Feb 26, 2024
1 parent f80e9aa commit c10d77f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/prebuilds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- "*"

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

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

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

- uses: actions/checkout@v4

- name: Setup NDK
Expand All @@ -46,7 +50,7 @@ jobs:
working-directory: ./package
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
run: npx --yes prebuild-for-nodejs-mobile@1.2.1 ${{ matrix.target }}
run: npx --yes prebuild-for-nodejs-mobile@18.17.7 ${{ matrix.target }} --verbose

- name: Upload original prebuild artifacts # mostly for debugging purposes
uses: actions/upload-artifact@v3
Expand All @@ -56,12 +60,9 @@ jobs:

# The below steps are needed for the release job

- name: Set NODE_ABI env var
run: echo "NODE_ABI=$(node -e 'console.log(process.versions.modules)')" >> "$GITHUB_ENV"

- name: Derive release artifact name
id: artifact-name
run: echo "NAME=${{ env.MODULE_NAME }}-${{ env.MODULE_VERSION }}-node-${{ env.NODE_ABI }}-${{ matrix.TARGET }}" >> "$GITHUB_OUTPUT"
run: echo "NAME=${{ env.MODULE_NAME }}-${{ env.MODULE_VERSION }}-${{ matrix.TARGET }}" >> "$GITHUB_OUTPUT"

- name: Prepare release artifact
run: tar -czf ${{ steps.artifact-name.outputs.NAME }}.tar.gz --directory=./package/prebuilds/${{ matrix.TARGET }} .
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
18
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

### Requirements

- Node >= 16 and npm < 9
- Node 18
- Android NDK 24.0.8215888
- (optional) exported `ANDROID_NDK_PATH` environment variable

Expand Down

0 comments on commit c10d77f

Please sign in to comment.