chore(bors): merge pull request #795 #821
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 Artifacts | |
| on: | |
| push: | |
| tags: | |
| - 'v[0-9]+.[0-9]+.[0-9]+**' | |
| branches: | |
| - 'release/**' | |
| - 'develop' | |
| jobs: | |
| kubectl-plugin: | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| id-token: "write" | |
| contents: "read" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # NOTE: Update the .krew.yaml file (if required) when making changes here. | |
| - os: oracle-vm-8cpu-32gb-x86-64 | |
| target: linux-musl | |
| arch: x86_64 | |
| - os: oracle-vm-8cpu-32gb-x86-64 | |
| target: linux-musl | |
| arch: aarch64 | |
| - os: macos-15 | |
| target: apple-darwin | |
| arch: aarch64 | |
| - os: macos-15-intel | |
| target: apple-darwin | |
| arch: x86_64 | |
| - os: oracle-vm-8cpu-32gb-x86-64 | |
| target: windows-gnu | |
| arch: x86_64 | |
| suffix: .exe | |
| steps: | |
| - uses: actions/checkout@v4 | |
| env: | |
| checkout_token: ${{ secrets.ORG_CI_GITHUB }} | |
| if: ${{ env.checkout_token == '' }} | |
| with: | |
| fetch-depth: 0 | |
| submodules: recursive | |
| - uses: actions/checkout@v4 | |
| env: | |
| checkout_token: ${{ secrets.ORG_CI_GITHUB }} | |
| if: ${{ env.checkout_token != '' }} | |
| with: | |
| fetch-depth: 0 | |
| submodules: recursive | |
| token: ${{ secrets.ORG_CI_GITHUB }} | |
| - run: | | |
| # BUG: HEAD tag is fetched as lightweight instead of annotated | |
| # https://github.com/actions/checkout/issues/290 | |
| if [ "${{ github.ref_type }}" == "tag" ]; then | |
| git fetch -f origin ${{ github.ref }}:${{ github.ref }} | |
| fi | |
| - uses: cachix/[email protected] | |
| with: | |
| enable_kvm: false | |
| - run: | | |
| nix-build -A utils.release.${{ matrix.arch }}.${{ matrix.target }}.kubectl-plugin --arg incremental false ${{ matrix.system }} | |
| - name: Archive executable | |
| run: | | |
| # NOTE: Update the .krew.yaml file (if required) when making changes here. | |
| tar -czvf kubectl-mayastor-${{ matrix.arch }}-${{ matrix.target }}.tar.gz LICENSE -C result/bin kubectl-mayastor${{ matrix.suffix }} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: kubectl-mayastor-${{ matrix.arch }}-${{ matrix.target }} | |
| path: kubectl-mayastor-${{ matrix.arch }}-${{ matrix.target }}.tar.gz | |
| if-no-files-found: error |