refactor: node #69
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
# https://github.com/stackblitz-labs/pkg.pr.new | ||
name: Preview Commit | ||
on: [pull_request] | ||
jobs: | ||
build: | ||
name: Build bindings and node packages | ||
uses: ./.github/workflows/rust-build.yml | ||
Check failure on line 9 in .github/workflows/preview-commit.yaml GitHub Actions / .github/workflows/preview-commit.yamlInvalid workflow file
|
||
publish: | ||
if: github.repository == 'farm-fe/farm' | ||
name: Pkg Preview | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Node | ||
uses: ./.github/actions/setup-node | ||
- name: Git Reset Hard | ||
run: git reset --hard # fix pnpm install add new line for package.json | ||
# - name: Download Binding Artifacts | ||
# uses: actions/download-artifact@v4 | ||
# with: | ||
# path: packages/rolldown/artifacts | ||
# - name: Move Binding Artifacts | ||
# run: pnpm --filter rolldown artifacts | ||
# - name: List Rolldown Bindings | ||
# run: ls -R ./packages/rolldown/npm | ||
# shell: bash | ||
# - name: Download Node Artifacts | ||
# uses: actions/download-artifact@v4 | ||
# with: | ||
# path: packages/rolldown/dist | ||
# name: node-artifact | ||
# batch download artifacts | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
path: /tmp/artifacts | ||
- name: Copy Farm Core Binary | ||
run: cp /tmp/artifacts/${{ github.sha }}-linux-x64-gnu/* ./packages/core/binding | ||
- name: Move Artifacts | ||
run: | | ||
for abi in linux-x64-gnu linux-x64-musl linux-arm64-musl linux-arm64-gnu | ||
do | ||
mv /tmp/artifacts/${{ github.sha }}-${abi}/* ./packages/core/npm/${abi} | ||
test -f ./packages/core/npm/${abi}/farm.${abi}.node | ||
done | ||
- name: Copy Licenses | ||
run: | | ||
find ./packages/ -type d -maxdepth 1 -exec cp LICENSE {} \; | ||
find ./packages/ -type d -maxdepth 1 -exec cp THIRD-PARTY-LICENSE {} \; | ||
- name: Release | ||
run: pnpx pkg-pr-new publish --compact --pnpm './packages/core/npm/*' './packages/core' |