summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatan Kushner <hello@matchai.me>2019-10-04 21:47:09 +0900
committerMatan Kushner <hello@matchai.me>2019-10-04 21:47:09 +0900
commite90a3768da7882db092b38d141cf8e19fabbee56 (patch)
tree3c2eced8c23307bf6c75b56ca802bc58516f8244
parentcda01deffa68ca08cbf16d0c5dfb7a792e8375ce (diff)
ci: Use target as matrix instead of OS
-rw-r--r--.github/workflows/workflow.yml30
1 files changed, 14 insertions, 16 deletions
diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml
index e5a6f6ef8..1c2f69907 100644
--- a/.github/workflows/workflow.yml
+++ b/.github/workflows/workflow.yml
@@ -154,26 +154,24 @@ jobs:
github_release:
if: startsWith(github.ref, 'refs/tags/v')
- name: Create GitHub release [${{ matrix.target }}]
+ name: Create GitHub release
needs: [test, docker_test]
strategy:
fail-fast: false
matrix:
- # In order to use different target names on parallel ubuntu builds,
- # we use `ubuntu-latest` and `ubuntu-18.04` to include them separately
- os: [ubuntu-latest, ubuntu-18.04, macOS-latest]
+ target:
+ - x86_64-unknown-linux-gnu
+ - x86_64-unknown-linux-musl
+ - x86_64-apple-darwin
include:
- - os: ubuntu-latest
- target: x86_64-unknown-linux-gnu
- bin: starship
+ - target: x86_64-unknown-linux-gnu
+ os: ubuntu-latest
name: starship-x86_64-unknown-linux-gnu.tar.gz
- - os: ubuntu-18.04
- target: x86_64-unknown-linux-musl
- bin: starship
+ - target: x86_64-unknown-linux-musl
+ os: ubuntu-latest
name: starship-x86_64-unknown-linux-musl.tar.gz
- - os: macOS-latest
- target: x86_64-apple-darwin
- bin: starship
+ - target: x86_64-apple-darwin
+ os: macOS-latest
name: starship-x86_64-apple-darwin.tar.gz
runs-on: ${{ matrix.os }}
steps:
@@ -198,13 +196,13 @@ jobs:
- name: Prepare build artifacts
run: |
- strip target/${{ matrix.target }}/release/${{ matrix.bin }}
+ strip target/${{ matrix.target }}/release/starship
cd target/${{ matrix.target }}/release
if [[ "${{ matrix.os }}" == "windows-latest" ]]
then
- 7z a ../../../${{ matrix.name }} ${{ matrix.bin }}
+ 7z a ../../../${{ matrix.name }} starship
else
- tar czvf ../../../${{ matrix.name }} ${{ matrix.bin }}
+ tar czvf ../../../${{ matrix.name }} starship
fi
cd -