5353 args : --verbose
5454
5555 build :
56+ needs :
57+ - checks
58+
5659 strategy :
5760 matrix :
5861 target :
@@ -64,14 +67,17 @@ jobs:
6467 include :
6568 - target : x86_64-pc-windows-msvc
6669 host : windows-2022
70+ artifact : jpki-cli.exe
6771 cli : true
6872 android : false
6973 - target : x86_64-apple-darwin
7074 host : macos-12
75+ artifact : jpki-cli
7176 cli : true
7277 android : false
7378 - target : x86_64-unknown-linux-gnu
7479 host : ubuntu-20.04
80+ artifact : jpki-cli
7581 cli : true
7682 android : false
7783 - target : aarch64-linux-android
@@ -118,6 +124,19 @@ jobs:
118124 ln -s "$TOOLCHAIN/llvm-ar" "$TOOLCHAIN/${{ matrix.target }}-ar"
119125 ln -s "$TOOLCHAIN/llvm-ar" "$TOOLCHAIN/arm-linux-androideabi-ar"
120126
127+ - name : Install cargo-edit-version
128+ if : ${{ github.event_name == 'release' }}
129+ uses : actions-rs/cargo@v1
130+ with :
131+ command : install
132+ args : --verbose cargo-edit-version
133+
134+ - name : Set version by the release tag
135+ if : ${{ github.event_name == 'release' }}
136+ run :
137+ cargo-edit-version "${{ github.event.release.tag_name }}"
138+ cd ./cli && cargo-edit-version "${{ github.event.release.tag_name }}"
139+
121140 - name : Build (CLI)
122141 if : ${{ matrix.cli }}
123142 uses : actions-rs/cargo@v1
@@ -133,6 +152,13 @@ jobs:
133152 args : --verbose --release --target=${{ matrix.target }} -p jpki-android
134153 use-cross : true
135154
155+ - uses : svenstaro/upload-release-action@v2
156+ if : ${{ github.event_name == 'release' && matrix.cli }}
157+ with :
158+ file : target/release/${{ matrix.artifact }}
159+ asset_name : jpki-cli-${{ matrix.target }}
160+ overwrite : true
161+
136162 - uses : actions/upload-artifact@v2
137163 if : ${{ matrix.target == 'x86_64-unknown-linux-gnu' }}
138164 with :
@@ -166,17 +192,6 @@ jobs:
166192 - name : Install libnfc
167193 run : sudo apt install libnfc5 libnfc-dev udev libudev-dev pcscd libpcsclite-dev
168194
169- - name : Install cargo-edit-version
170- uses : actions-rs/cargo@v1
171- with :
172- command : install
173- args : --verbose cargo-edit-version
174-
175- - name : Set version by the release tag
176- run :
177- cargo-edit-version "${{ github.event.release.tag_name }}"
178- cd ./cli && cargo-edit-version "${{ github.event.release.tag_name }}"
179-
180195 - name : Log into crates.io
181196 uses : actions-rs/cargo@v1
182197 with :
0 commit comments