-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (56 loc) · 1.48 KB
/
release.yml
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
62
63
64
65
name: Build Release
on:
push:
tags:
- v*
- pre-rel-*
env:
CARGO_TERM_COLOR: always
rust_stable: 1.76.0
jobs:
release:
name: CI
runs-on: ${{ matrix.os }}-latest
if: startsWith(github.ref, 'refs/tags/')
strategy:
fail-fast: true
matrix:
os:
- ubuntu
- windows
- macos
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.rust_stable }}
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- name: Install smartcard libraries ( Linux only )
if: runner.os == 'Linux'
run: |
sudo apt install -y libpcsclite-dev
- name: Build
if: runner.os != 'Linux'
run: cargo build --workspace --release
- name: Build cli with smartcard ( Linux only )
if: runner.os == 'Linux'
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace --release --features smartcard
- name: Pack
id: pack
shell: bash
env:
OS_NAME: ${{ matrix.os }}
GITHUB_REF: ${{ github.ref }}
run: |
bash .ci/pack-build.sh
- name: Release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: |
releases/golem-certificate-cli-*
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre-rel-v') }}