Release #19
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* | |
| workflow_dispatch: | |
| inputs: | |
| publish: | |
| description: "Publish the packages" | |
| required: true | |
| default: false | |
| type: boolean | |
| jobs: | |
| publish-native: | |
| strategy: | |
| matrix: | |
| include: | |
| - platform: win32 | |
| arch: arm64 | |
| os: windows-latest | |
| - platform: linux | |
| arch: arm64 | |
| os: ubuntu-22.04-arm | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Setup QNN SDK | |
| uses: mybigday/setup-qnn-sdk@main | |
| with: | |
| qnn-sdk-version: 2.42.0.251225 | |
| - name: Install dependencies | |
| run: npm run bootstrap | |
| - name: Build native module | |
| run: npm run build -- -a ${{ matrix.arch }} | |
| - name: Publish | |
| if: ${{ inputs.publish || startsWith(github.ref, 'refs/tags/v') }} | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| working-directory: packages/node-qnn-llm-${{ matrix.platform }}-${{ matrix.arch }} | |
| run: npm publish | |
| - name: Upload artifacts | |
| if: ${{ !inputs.publish }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: bin-${{ matrix.platform }}-${{ matrix.arch }} | |
| path: packages/node-qnn-llm-${{ matrix.platform }}-${{ matrix.arch }} | |
| publish-js: | |
| if: ${{ inputs.publish || startsWith(github.ref, 'refs/tags/v') }} | |
| needs: | |
| - publish-native | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install dependencies | |
| run: npm run bootstrap | |
| - name: Publish | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| run: npm publish |