Test to bundle release artifacts #33
Workflow file for this run
This file contains hidden or 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: Test to bundle release artifacts | |
| on: [workflow_dispatch] | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| settings: | |
| - host: macos-12 | |
| target: macos-x64 | |
| - host: macos-14 | |
| target: macos-arm64 | |
| - host: windows-2022 | |
| target: win-x64 | |
| extension: .exe | |
| - host: ubuntu-latest | |
| target: linux-x64 | |
| runs-on: ${{ matrix.settings.host }} | |
| name: dev build - ${{ matrix.settings.target }} - node@22 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.x | |
| - if: matrix.settings.host == 'macos-14' | |
| run: brew install python-setuptools | |
| - if: matrix.settings.host == 'macos-12' | |
| run: pip install setuptools | |
| - run: yarn | |
| - run: yarn run build | |
| # remove dev dependencies before packaging | |
| - run: yarn workspaces focus --all --production | |
| # package final binaries | |
| - run: | | |
| yarn dlx @yao-pkg/[email protected] ./dist -t node22-${{ matrix.settings.target }} -o bundle/dcli-${{ matrix.settings.target }}${{ matrix.settings.extension }} -C Brotli "--public" "--public-packages" "tslib,thirty-two,node-hkdf-sync,vows" "--no-bytecode" | |
| - name: Archive binary artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dcli-${{ matrix.settings.target }} | |
| path: bundle/dcli-${{ matrix.settings.target }}${{ matrix.settings.extension }} | |
| retention-days: 1 | |
| release: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: List artifacts | |
| run: ls -R artifacts | |
| shell: bash |