diff --git a/.github/actions/nodeci-build-linux/action.yml b/.github/actions/nodeci-build-linux/action.yml new file mode 100644 index 0000000..43a0685 --- /dev/null +++ b/.github/actions/nodeci-build-linux/action.yml @@ -0,0 +1,25 @@ +name: 'Build for Linux' +inputs: + name: # vlc-rpc-v${{steps.get-version.outputs.version}}-nightly${{env.NOW}}-bundled-linux-x64 + required: true +runs: + using: "composite" + steps: + - name: Package for Linux + run: | + mkdir -p .dist/zipped/ + mkdir -p .dist/linux-x64/ + mkdir -p .help/linux-x64/node + cp -rv * .dist/linux-x64/ + archiveName=$(wget -O - https://nodejs.org/download/release/latest/ | grep -Poh "node-v[0-9]+.[0-9]+.[0-9]+-linux-x64.tar.gz(?=<)") + wget -P .help/linux-x64 "https://nodejs.org/download/release/latest/$archiveName" + tar -zxvf ".help/linux-x64/$archiveName" -C .help/linux-x64/node + cp -rv .help/linux-x64/node/**/bin/node .dist/linux-x64/ + zip -r ".dist/zipped/${{inputs.name}}.zip" .dist/linux-x64 + shell: bash + - name: Archive Linux artifacts + uses: actions/upload-artifact@v3 + with: + name: ${{inputs.name}} + path: | + .dist/linux-x64 diff --git a/.github/actions/nodeci-build-windows/action.yml b/.github/actions/nodeci-build-windows/action.yml new file mode 100644 index 0000000..fe42dab --- /dev/null +++ b/.github/actions/nodeci-build-windows/action.yml @@ -0,0 +1,21 @@ +name: 'Build for Windows' +inputs: + name: # vlc-rpc-v${{steps.get-version.outputs.version}}-nightly${{env.NOW}}-bundled-win-x64 + required: true +runs: + using: "composite" + steps: + - name: Package for Windows + run: | + mkdir -p .dist/zipped/ + mkdir -p .dist/win-x64/ + cp -rv * .dist/win-x64/ + wget -P .dist/win-x64 https://nodejs.org/download/release/latest/win-x64/node.exe + zip -r ".dist/zipped/${{inputs.name}}.zip" .dist/win-x64 + shell: bash + - name: Archive Windows artifacts + uses: actions/upload-artifact@v3 + with: + name: ${{inputs.name}} + path: | + .dist/win-x64 diff --git a/.github/workflows/nodeci_push_main.yml b/.github/workflows/nodeci_push_main.yml index 08d46ca..3c19fb9 100644 --- a/.github/workflows/nodeci_push_main.yml +++ b/.github/workflows/nodeci_push_main.yml @@ -25,35 +25,12 @@ jobs: uses: beaconbrigade/package-json-version@v0.3 with: path: . - - name: Package for Windows - run: | - mkdir -p .dist/zipped/ - mkdir -p .dist/win-x64/ - cp -rv * .dist/win-x64/ - wget -P .dist/win-x64 https://nodejs.org/download/release/latest/win-x64/node.exe - zip -r .dist/zipped/vlc-rpc-v${{steps.get-version.outputs.version}}-nightly${{env.NOW}}-bundled-win-x64.zip .dist/win-x64 - - name: Package for Linux - run: | - mkdir -p .dist/zipped/ - mkdir -p .dist/linux-x64/ - mkdir -p .help/linux-x64/node - cp -rv * .dist/linux-x64/ - wget -P .help/linux-x64 https://nodejs.org/download/release/latest/node-v21.1.0-linux-x64.tar.gz - tar -zxvf .help/linux-x64/node-v21.1.0-linux-x64.tar.gz -C .help/linux-x64/node - cp -rv .help/linux-x64/node/**/bin/node .dist/linux-x64/ - zip -r .dist/zipped/vlc-rpc-v${{steps.get-version.outputs.version}}-nightly${{env.NOW}}-bundled-linux-x64.zip .dist/linux-x64 - - name: Archive Windows artifacts - uses: actions/upload-artifact@v3 + - uses: ./.github/actions/nodeci-build-windows with: name: vlc-rpc-v${{steps.get-version.outputs.version}}-nightly${{env.NOW}}-bundled-win-x64 - path: | - .dist/win-x64 - - name: Archive Linux artifacts - uses: actions/upload-artifact@v3 + - uses: ./.github/actions/nodeci-build-linux with: name: vlc-rpc-v${{steps.get-version.outputs.version}}-nightly${{env.NOW}}-bundled-linux-x64 - path: | - .dist/linux-x64 - name: Archive code coverage results uses: actions/upload-artifact@v3 with: diff --git a/.github/workflows/nodeci_push_notmain.yml b/.github/workflows/nodeci_push_notmain.yml index 60da33c..5bde2a6 100644 --- a/.github/workflows/nodeci_push_notmain.yml +++ b/.github/workflows/nodeci_push_notmain.yml @@ -25,35 +25,12 @@ jobs: uses: beaconbrigade/package-json-version@v0.3 with: path: . - - name: Package for Windows - run: | - mkdir -p .dist/zipped/ - mkdir -p .dist/win-x64/ - cp -rv * .dist/win-x64/ - wget -P .dist/win-x64 https://nodejs.org/download/release/latest/win-x64/node.exe - zip -r .dist/zipped/vlc-rpc-v${{steps.get-version.outputs.version}}-nightly${{env.NOW}}-bundled-win-x64.zip .dist/win-x64 - - name: Package for Linux - run: | - mkdir -p .dist/zipped/ - mkdir -p .dist/linux-x64/ - mkdir -p .help/linux-x64/node - cp -rv * .dist/linux-x64/ - wget -P .help/linux-x64 https://nodejs.org/download/release/latest/node-v21.1.0-linux-x64.tar.gz - tar -zxvf .help/linux-x64/node-v21.1.0-linux-x64.tar.gz -C .help/linux-x64/node - cp -rv .help/linux-x64/node/**/bin/node .dist/linux-x64/ - zip -r .dist/zipped/vlc-rpc-v${{steps.get-version.outputs.version}}-nightly${{env.NOW}}-bundled-linux-x64.zip .dist/linux-x64 - - name: Archive Windows artifacts - uses: actions/upload-artifact@v3 + - uses: ./.github/actions/nodeci-build-windows with: name: vlc-rpc-v${{steps.get-version.outputs.version}}-nightly${{env.NOW}}-bundled-win-x64 - path: | - .dist/win-x64 - - name: Archive Linux artifacts - uses: actions/upload-artifact@v3 + - uses: ./.github/actions/nodeci-build-linux with: name: vlc-rpc-v${{steps.get-version.outputs.version}}-nightly${{env.NOW}}-bundled-linux-x64 - path: | - .dist/linux-x64 - name: Archive code coverage results uses: actions/upload-artifact@v3 with: