fix: release workflow — flatten artifact subdirectories #1
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: Release | |
| on: | |
| push: | |
| tags: ["v*"] | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| target: node22-linux-x64 | |
| artifact: pump-quant-linux-x64 | |
| - os: macos-latest | |
| target: node22-macos-arm64 | |
| artifact: pump-quant-macos-arm64 | |
| - os: macos-13 | |
| target: node22-macos-x64 | |
| artifact: pump-quant-macos-x64 | |
| - os: windows-latest | |
| target: node22-win-x64 | |
| artifact: pump-quant-win-x64.exe | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - run: npm ci | |
| - name: Bundle | |
| run: npx esbuild src/index.ts --bundle --platform=node --format=cjs --outfile=dist/agent.cjs | |
| - name: Compile binary | |
| run: npx pkg dist/agent.cjs --target ${{ matrix.target }} --output dist/${{ matrix.artifact }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact }} | |
| path: dist/${{ matrix.artifact }} | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Collect binaries | |
| run: | | |
| mkdir -p release | |
| find artifacts -type f -exec cp {} release/ \; | |
| ls -la release/ | |
| - name: Create release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| generate_release_notes: true | |
| files: release/* |