Skip to content

Commit

Permalink
Merge pull request #132 from nspcc-dev/enable-arm64-and-darwin
Browse files Browse the repository at this point in the history
workflows: enable arm64 and darwin binary builds
  • Loading branch information
roman-khimov authored Apr 25, 2024
2 parents d754eb3 + 04e684d commit 604ea62
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ jobs:
build_cli:
name: Build CLI
runs-on: ubuntu-22.04
strategy:
matrix:
os: [ linux, darwin ]
arch: [ amd64, arm64 ]

steps:
- uses: actions/checkout@v4
Expand All @@ -51,21 +55,21 @@ jobs:
run: if [[ $(make version) == *"dirty"* ]]; then exit 1; fi

- name: Build CLI
run: make
run: GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} make

- name: Rename CLI binary
run: mv ./bin/neo-exporter* ./bin/neo-exporter-linux-amd64
run: mv ./bin/neo-exporter* ./bin/neo-exporter-${{ matrix.os }}-${{ matrix.arch }}${{ (matrix.os == 'windows' && '.exe') || '' }}

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: neo-exporter
name: neo-exporter-${{ matrix.os }}-${{ matrix.arch }}
path: ./bin/neo-exporter*
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 }} ./bin/neo-exporter-linux-amd64
run: gh release upload ${{ github.event.release.tag_name }} ./bin/neo-exporter-${{ matrix.os }}-${{ matrix.arch }}${{ (matrix.os == 'windows' && '.exe') || '' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down

0 comments on commit 604ea62

Please sign in to comment.