-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (51 loc) · 1.42 KB
/
build-version.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
name: "Version build"
on:
push:
tags:
- "v*.*.*"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: macos-latest
target: x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
- uses: actions-rs/cargo@v1
with:
command: build
args: --release --all-features --target=${{ matrix.target }}
- name: Archive build artifacts
uses: actions/upload-artifact@v2
with:
name: build-${{matrix.target}}
path: ${{ github.workspace }}/target/${{ matrix.target }}/release/cdh
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download artifact
uses: actions/download-artifact@v2
- name: Set version variable
run: echo "CDH_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Rename release to avoid name conflict
run: ./scripts/rename_releases.sh
- name: Release
uses: softprops/action-gh-release@v1
with:
files: release/*