9
9
CARGO_TERM_COLOR : always
10
10
11
11
jobs :
12
-
13
12
verify-version :
14
13
runs-on : ubuntu-latest
15
14
steps :
16
- - uses : actions/checkout@v2
17
- - run : |
18
- tag="${GITHUB_REF#refs/tags/}"
19
- package_version="$(cargo read-manifest | jq --raw-output .version)"
20
- echo "Git tag name: ${tag}"
21
- echo "Cargo.toml version: ${package_version}"
22
- test "$tag" == "$package_version"
15
+ - uses : actions/checkout@v2
16
+ - run : |
17
+ tag="${GITHUB_REF#refs/tags/}"
18
+ package_version="$(cargo read-manifest | jq --raw-output .version)"
19
+ echo "Git tag name: ${tag}"
20
+ echo "Cargo.toml version: ${package_version}"
21
+ test "$tag" == "$package_version"
23
22
24
23
# Run the tests and create a fresh cache before releasing. Make sure that the
25
24
# same code that was tested is what gets released.
@@ -28,18 +27,18 @@ jobs:
28
27
strategy :
29
28
matrix :
30
29
os :
31
- - ubuntu-latest
32
- - macos-latest
30
+ - ubuntu-latest
31
+ - macos-latest
33
32
steps :
34
- - uses : actions/checkout@v2
35
- - uses : actions/cache@v2
36
- with :
37
- path : |
38
- ~/.cargo/registry
39
- ~/.cargo/git
40
- target/release
41
- key : release-${{ runner.os }}-${{ github.job }}-${{ secrets.CI_CACHE_VERSION }}
42
- - run : cargo test --release
33
+ - uses : actions/checkout@v2
34
+ - uses : actions/cache@v2
35
+ with :
36
+ path : |
37
+ ~/.cargo/registry
38
+ ~/.cargo/git
39
+ target/release
40
+ key : release-${{ runner.os }}-${{ github.job }}-${{ secrets.CI_CACHE_VERSION }}
41
+ - run : cargo test --release
43
42
44
43
publish-binary :
45
44
needs :
49
48
strategy :
50
49
matrix :
51
50
os :
52
- - ubuntu-latest
53
- - macos-latest
51
+ - ubuntu-latest
52
+ - macos-latest
54
53
include :
55
54
- os : macos-latest
56
55
artifact_prefix : macos-x86-64
@@ -59,34 +58,34 @@ jobs:
59
58
artifact_prefix : linux-x86-64
60
59
target : x86_64-unknown-linux-gnu
61
60
steps :
62
- - uses : actions/checkout@v2
63
- - uses : actions/cache@v2
64
- with :
65
- path : |
66
- ~/.cargo/registry
67
- ~/.cargo/git
68
- target/release
69
- key : release-${{ runner.os }}-${{ github.job }}-${{ secrets.CI_CACHE_VERSION }}
70
- - run : rustup target add ${{ matrix.target }}
71
- - run : cargo build --release --target ${{ matrix.target }}
72
- - name : package binary
73
- shell : bash
74
- run : |
75
- cd target/${{ matrix.target }}/release
76
- strip ${{ github.event.repository.name }}
77
- tar czvf \
78
- ${{ github.event.repository.name }}-${{ matrix.artifact_prefix }}.tar.gz \
79
- ${{ github.event.repository.name }}
80
- shasum -a 256 ${{ github.event.repository.name }}-${{ matrix.artifact_prefix }}.tar.gz \
81
- > ${{ github.event.repository.name }}-${{ matrix.artifact_prefix }}.sha256
82
- - name : publish release to github
83
- uses : softprops/action-gh-release@v1
84
- with :
85
- files : |
86
- target/${{ matrix.target }}/release/${{ github.event.repository.name }}-${{ matrix.artifact_prefix }}.tar.gz
87
- target/${{ matrix.target }}/release/${{ github.event.repository.name }}-${{ matrix.artifact_prefix }}.sha256
88
- env :
89
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
61
+ - uses : actions/checkout@v2
62
+ - uses : actions/cache@v2
63
+ with :
64
+ path : |
65
+ ~/.cargo/registry
66
+ ~/.cargo/git
67
+ target/release
68
+ key : release-${{ runner.os }}-${{ github.job }}-${{ secrets.CI_CACHE_VERSION }}
69
+ - run : rustup target add ${{ matrix.target }}
70
+ - run : cargo build --release --target ${{ matrix.target }}
71
+ - name : package binary
72
+ shell : bash
73
+ run : |
74
+ cd target/${{ matrix.target }}/release
75
+ strip ${{ github.event.repository.name }}
76
+ tar czvf \
77
+ ${{ github.event.repository.name }}-${{ matrix.artifact_prefix }}.tar.gz \
78
+ ${{ github.event.repository.name }}
79
+ shasum -a 256 ${{ github.event.repository.name }}-${{ matrix.artifact_prefix }}.tar.gz \
80
+ > ${{ github.event.repository.name }}-${{ matrix.artifact_prefix }}.sha256
81
+ - name : publish release to github
82
+ uses : softprops/action-gh-release@v1
83
+ with :
84
+ files : |
85
+ target/${{ matrix.target }}/release/${{ github.event.repository.name }}-${{ matrix.artifact_prefix }}.tar.gz
86
+ target/${{ matrix.target }}/release/${{ github.event.repository.name }}-${{ matrix.artifact_prefix }}.sha256
87
+ env :
88
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
90
89
91
90
publish-crate :
92
91
needs :
0 commit comments