Skip to content

Generate prebuilds

Generate prebuilds #20

Workflow file for this run

name: Generate prebuilds
on:
workflow_dispatch:
inputs:
module_version:
description: 'Module version'
required: true
default: 'latest'
env:
NODE_VERSION: 18
MODULE_NAME: "sodium-native"
jobs:
build:
strategy:
matrix:
platform: [android]
arch: [arm64, x64, arm]
uses: digidem/nodejs-mobile-prebuilds/.github/workflows/prebuild.yml@main
with:
module_name: "sodium-native"
module_version: ${{ inputs.module_version }}
platform: ${{ matrix.platform }}
arch: ${{ matrix.arch }}
release:
needs: build
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: prebuilds
- run: |
mkdir -p artifacts
for folder in prebuilds/*/; do
folder_name=$(basename "$folder")
tar -czf "$artifacts/${{ env.MODULE_NAME }}-${{ needs.build.outputs.version }}-${folder_name}.tar.gz" -C "prebuilds" "$folder_name"
done
- run: ls -laR
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
artifacts: "artifacts/*"
artifactErrorsFailBuild: true
allowUpdates: true
replacesArtifacts: true
tag: ${{ needs.build.outputs.version }}