build nodejs v16 #50
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
name: build nodejs v16 | |
on: | |
workflow_dispatch: | |
inputs: | |
tag_date: | |
description: 'tag date' | |
required: true | |
env: | |
VERSION: 16.16.0 | |
jobs: | |
build_windows: | |
name: Windows | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: npm install | |
shell: bash | |
run: npm install | |
- name: Run build script | |
continue-on-error: true | |
shell: cmd | |
run: | | |
cd %GITHUB_WORKSPACE% | |
call .\windows_trybuild.cmd ${{env.VERSION}} | |
- name: Run upload script | |
shell: cmd | |
run: | | |
cd %GITHUB_WORKSPACE% | |
call .\windows_64.cmd | |
- name: Rename | |
shell: bash | |
run: | | |
mv puerts-node/nodejs puerts-node/nodejs_16 | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: nodejs_bin | |
path: puerts-node/**/* | |
build_windows_32: | |
name: Windows-32 | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: npm install | |
shell: bash | |
run: npm install | |
- name: Run build script | |
continue-on-error: true | |
shell: cmd | |
run: | | |
cd %GITHUB_WORKSPACE% | |
call .\windows_trybuild.cmd ${{env.VERSION}} | |
- name: Run upload script | |
shell: cmd | |
run: | | |
cd %GITHUB_WORKSPACE% | |
call .\windows_32.cmd | |
- name: Rename | |
shell: bash | |
run: | | |
mv puerts-node/nodejs puerts-node/nodejs_16 | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: nodejs_bin | |
path: puerts-node/**/* | |
build_macos: | |
name: macOS | |
runs-on: macos-11 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: npm install | |
shell: bash | |
run: npm install | |
- name: Run build script | |
run: | | |
cd $GITHUB_WORKSPACE | |
sh ./macos.sh ${{env.VERSION}} | |
- name: Rename | |
run: | | |
mv ~/puerts-node/nodejs ~/puerts-node/nodejs_16 | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: nodejs_bin | |
path: ~/puerts-node/**/* | |
build_macos_arm64: | |
name: macOS with apple m1 | |
runs-on: macos-11 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: npm install | |
shell: bash | |
run: npm install | |
- name: Run build script | |
run: | | |
cd $GITHUB_WORKSPACE | |
sh ./macos_arm64.sh ${{env.VERSION}} | |
- name: Rename | |
run: | | |
mv ~/puerts-node/nodejs ~/puerts-node/nodejs_16 | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: nodejs_bin | |
path: ~/puerts-node/**/* | |
build_ios: | |
name: iOS | |
runs-on: macos-11 | |
steps: | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '12' | |
- uses: actions/checkout@v2 | |
- name: npm install | |
shell: bash | |
run: npm install | |
- name: Run build script | |
run: | | |
cd $GITHUB_WORKSPACE | |
sh ./ios.sh ${{env.VERSION}} | |
- name: Rename | |
run: | | |
mv ~/puerts-node/nodejs ~/puerts-node/nodejs_16 | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: nodejs_bin | |
path: ~/puerts-node/**/* | |
build_linux: | |
name: linux | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: npm install | |
shell: bash | |
run: npm install | |
- name: Run build script | |
run: | | |
cd $GITHUB_WORKSPACE | |
sh ./linux.sh ${{env.VERSION}} | |
- name: Rename | |
run: | | |
mv ~/puerts-node/nodejs ~/puerts-node/nodejs_16 | |
cp $GITHUB_WORKSPACE/puer-build.json ~/puerts-node/nodejs_16 | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: nodejs_bin | |
path: ~/puerts-node/**/* | |
build_android_arm64_shared: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: npm install | |
shell: bash | |
run: npm install | |
- name: Install NDK | |
run: | | |
cd ~ | |
wget -O NDK -q https://dl.google.com/android/repository/android-ndk-r21b-linux-x86_64.zip | |
sudo apt install unzip -y | |
unzip -q NDK | |
- name: Build | |
run: | | |
cd $GITHUB_WORKSPACE | |
sh ./android.sh ${{env.VERSION}} arm64 | |
- name: Rename | |
run: | | |
mv ~/puerts-node/nodejs ~/puerts-node/nodejs_16 | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: nodejs_bin | |
path: ~/puerts-node/**/* | |
build_android_armv7_shared: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install gcc-multilib g++-multilib | |
run: | | |
sudo apt-get update | |
sudo apt-get install gcc-multilib g++-multilib | |
- uses: actions/checkout@v2 | |
- name: npm install | |
shell: bash | |
run: npm install | |
- name: Install NDK | |
run: | | |
cd ~ | |
wget -O NDK -q https://dl.google.com/android/repository/android-ndk-r21b-linux-x86_64.zip | |
sudo apt install unzip -y | |
unzip -q NDK | |
- name: Build | |
run: | | |
cd $GITHUB_WORKSPACE | |
sh ./android.sh ${{env.VERSION}} arm | |
- name: Rename | |
run: | | |
mv ~/puerts-node/nodejs ~/puerts-node/nodejs_16 | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: nodejs_bin | |
path: ~/puerts-node/**/* | |
build_android_arm64: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: npm install | |
shell: bash | |
run: npm install | |
- name: Install NDK | |
run: | | |
cd ~ | |
wget -O NDK -q https://dl.google.com/android/repository/android-ndk-r21b-linux-x86_64.zip | |
sudo apt install unzip -y | |
unzip -q NDK | |
- name: Build | |
run: | | |
cd $GITHUB_WORKSPACE | |
bash ./android-static.sh ${{env.VERSION}} arm64 | |
- name: Rename | |
run: | | |
mv ~/puerts-node/nodejs ~/puerts-node/nodejs_16 | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: nodejs_bin | |
path: ~/puerts-node/**/* | |
build_android_armv7: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install gcc-multilib g++-multilib | |
run: | | |
sudo apt-get update | |
sudo apt-get install gcc-multilib g++-multilib | |
- uses: actions/checkout@v2 | |
- name: npm install | |
shell: bash | |
run: npm install | |
- name: Install NDK | |
run: | | |
cd ~ | |
wget -O NDK -q https://dl.google.com/android/repository/android-ndk-r21b-linux-x86_64.zip | |
sudo apt install unzip -y | |
unzip -q NDK | |
- name: Build | |
run: | | |
cd $GITHUB_WORKSPACE | |
bash ./android-static.sh ${{env.VERSION}} arm | |
- name: Rename | |
run: | | |
mv ~/puerts-node/nodejs ~/puerts-node/nodejs_16 | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: nodejs_bin | |
path: ~/puerts-node/**/* | |
publish: | |
runs-on: ubuntu-latest | |
needs: [build_windows,build_windows_32,build_macos,build_macos_arm64,build_linux,build_ios,build_android_arm64,build_android_armv7,build_android_arm64_shared,build_android_armv7_shared] | |
steps: | |
- uses: actions/download-artifact@v1 | |
with: | |
name: nodejs_bin | |
path: nodejs_bin/ | |
- name: Create Release Asset | |
run: | | |
cd nodejs_bin/ && tar cvfz ../nodejs_bin_${{env.VERSION}}.tgz nodejs_16 && cd - | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: NodeJS_${{env.VERSION}}_${{ github.event.inputs.tag_date }} | |
release_name: NodeJS_${{env.VERSION}}_${{ github.event.inputs.tag_date }} | |
draft: false | |
prerelease: false | |
- name: Upload nodejs_bin | |
#id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./nodejs_bin_${{env.VERSION}}.tgz | |
asset_name: nodejs_bin_${{env.VERSION}}.tgz | |
asset_content_type: application/tgz | |