Merge pull request #126 from nspcc-dev/dependabot/go_modules/go.opent… #121
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: Build | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| types: [ opened, synchronize ] | |
| paths-ignore: | |
| - '**/*.md' | |
| push: | |
| # Build for the master branch. | |
| branches: | |
| - master | |
| release: | |
| # Publish released commit as Docker `latest` and `git_revision` images. | |
| types: | |
| - published | |
| jobs: | |
| build_cli: | |
| name: Build CLI | |
| runs-on: ${{matrix.os.name}} | |
| strategy: | |
| matrix: | |
| os: [ { name: ubuntu-latest, bin-name: linux }, { name: macos-latest, bin-name: darwin } ] | |
| arch: [ amd64, arm64 ] | |
| exclude: | |
| - os: { name: ubuntu-latest, bin-name: linux } | |
| arch: 'arm64' | |
| - os: { name: macos-latest, bin-name: darwin } | |
| arch: 'amd64' | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.26' | |
| cache: true | |
| - name: Update Go modules | |
| run: go mod download -json | |
| - name: Build CLI | |
| run: make | |
| env: | |
| GOARCH: ${{ matrix.arch }} | |
| - name: Rename CLI binary | |
| run: mv ./xk6-neofs* ./xk6-neofs-${{ matrix.os.bin-name }}-${{ matrix.arch }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: xk6-neofs-${{ matrix.os.bin-name }}-${{ matrix.arch }} | |
| path: ./xk6-neofs* | |
| if-no-files-found: error | |
| - name: Attach binary to the release as an asset | |
| if: ${{ github.event_name == 'release' }} | |
| run: gh release upload ${{ github.event.release.tag_name }} ./xk6-neofs-${{ matrix.os.bin-name }}-${{ matrix.arch }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |