Merge pull request #2727 from nspcc-dev/test

.github: give proper names to CLI binaries and artifact archives
This commit is contained in:
Roman Khimov 2022-10-06 13:19:45 +07:00 committed by GitHub
commit ece5fe731e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,14 +34,16 @@ on:
jobs: jobs:
build_cli: build_cli:
name: Build CLI name: Build CLI
runs-on: ${{matrix.os}} runs-on: ${{matrix.os.name}}
strategy: strategy:
matrix: matrix:
os: [ubuntu-20.04, windows-2022, macos-12] os: [{ name: ubuntu-20.04, bin-name: linux }, { name: windows-2022, bin-name: windows }, { name: macos-12, bin-name: darwin }]
arch: [amd64, arm64] arch: [amd64, arm64]
exclude: exclude:
- os: windows-2022 - os: { name: windows-2022, bin-name: windows }
arch: 'arm64' arch: 'arm64'
- os: { name: macos-12, bin-name: darwin }
arch: 'amd64'
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@ -64,10 +66,13 @@ jobs:
env: env:
GOARCH: ${{ matrix.arch }} GOARCH: ${{ matrix.arch }}
- name: Rename CLI binary
run: mv ./bin/neo-go* ./bin/neo-go-${{ matrix.os.bin-name }}-${{ matrix.arch }}${{ (matrix.os.bin-name == 'windows' && '.exe') || '' }}
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: neo-go-${{ matrix.os }}-${{ matrix.arch }} name: neo-go-${{ matrix.os.bin-name }}-${{ matrix.arch }}
path: ./bin/neo-go* path: ./bin/neo-go*
if-no-files-found: error if-no-files-found: error