update bridge version (#720) #145
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: NexaCLI on Linux | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| jobs: | |
| build-cli: | |
| name: ${{ matrix.runner }}_${{ matrix.arch }} | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - runner: ubuntu-22.04 | |
| arch: x86_64 | |
| - runner: ubuntu-22.04-arm | |
| arch: arm64 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Detect Tag Version | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| run: echo "VERSION=${{ github.ref_name }}" >> $GITHUB_ENV | |
| - name: Detect Commit Hash | |
| if: github.event_name == 'workflow_dispatch' | |
| run: echo "VERSION=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_ENV | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.24.3 | |
| cache-dependency-path: runner/go.sum | |
| - name: Download runtime | |
| run: | | |
| cd runner | |
| make download | |
| - name: Build Nexa Cli | |
| run: | | |
| cd runner | |
| make build | |
| rm build/ml.h | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: "nexa-cli_linux_${{ matrix.arch }}" | |
| path: runner/build | |
| include-hidden-files: true | |
| package-and-release: | |
| name: Package for ${{ matrix.runner }}_${{ matrix.arch }} | |
| needs: build-cli | |
| runs-on: ${{ matrix.runner }} | |
| if: github.ref_type == 'tag' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - runner: ubuntu-22.04 | |
| arch: x86_64 | |
| - runner: ubuntu-22.04-arm | |
| arch: arm64 | |
| env: | |
| VERSION: ${{ github.ref_name }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: "nexa-cli_linux_${{ matrix.arch }}" | |
| path: artifacts | |
| - name: Create Self-Contained Installer Script | |
| id: package | |
| run: | | |
| chmod +x runner/release/linux/package.sh | |
| ./runner/release/linux/package.sh artifacts \ | |
| runner/release/linux/install.sh \ | |
| nexa-cli_linux_${{ matrix.arch }}.sh | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| repository: NexaAI/nexa-sdk | |
| tag_name: ${{ env.VERSION }} | |
| files: | | |
| nexa-cli_linux_${{ matrix.arch }}.sh | |
| draft: ${{ contains(github.ref, '-rc') }} | |
| generate_release_notes: true | |
| make_latest: ${{ !contains(github.ref, '-rc') }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.ZACK_ACCESS_TOKEN }} | |
| - name: Configure AWS credentials | |
| if: ${{ !contains(github.ref, '-rc') }} | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: us-west-1 | |
| - name: Sync to S3 | |
| if: ${{ !contains(github.ref, '-rc') }} | |
| shell: bash | |
| run: | | |
| aws s3 cp "nexa-cli_linux_${{ matrix.arch }}.sh" "s3://nexa-model-hub-bucket/public/nexa_sdk/downloads/nexa-cli_linux_${{ matrix.arch }}.sh" |