Skip to content

Commit e7110fe

Browse files
committed
feat(workflows): Add workflow to release
Add github workflow to make binary releases Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
1 parent 82d57a6 commit e7110fe

3 files changed

Lines changed: 64 additions & 0 deletions

File tree

.github/workflows/build.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
on:
2+
release:
3+
types: [created]
4+
workflow_dispatch:
5+
6+
name: Build and release
7+
jobs:
8+
build_and_test:
9+
name: Rust project - latest
10+
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
targets:
15+
- x86_64-unknown-linux-gnu
16+
- x86_64-unknown-linux-musl
17+
- aarch64-unknown-linux-gnu
18+
- aarch64-unknown-linux-musl
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Add dependencies (ssl-dev, etc)
22+
run: sudo apt-get install libssl-dev pkg-config
23+
- name: Install aarch64-buildroot-linux-gnu-gcc for relevant target
24+
if: matrix.targets == 'aarch64-unknown-linux-gnu'
25+
run: sudo apt-get install gcc-aarch64-linux-gnu
26+
- name: Install aarch64-buildroot-linux-musl-gcc for relevant target
27+
if: matrix.targets == 'aarch64-unknown-linux-musl'
28+
run: sudo apt-get install gcc-aarch64-linux-musl
29+
- name: Install musl-gcc for relevant target
30+
if: matrix.targets == 'x86_64-unknown-linux-musl'
31+
run: sudo apt-get install musl-tools
32+
33+
- run: rustup target add ${{ matrix.targets }}
34+
- run: rustup update stable && rustup default stable
35+
- run: cargo build --verbose --target ${{ matrix.targets }}
36+
- name: release
37+
uses: actions/create-release@v1
38+
id: create_release
39+
with:
40+
draft: false
41+
prerelease: false
42+
release_name: ${{ steps.version.outputs.version }}
43+
tag_name: ${{ github.ref }}
44+
body_path: CHANGELOG.md
45+
env:
46+
GITHUB_TOKEN: ${{ github.token }}
47+
- name: upload
48+
uses: actions/upload-release-asset@v1
49+
with:
50+
upload_url: ${{ steps.create_release.outputs.upload_url }}
51+
asset_path: target/${{ matrix.targets }}/kernelci-storage
52+
asset_name: kernelci-storage
53+
asset_content_type: application/octet-stream
54+
env:
55+
GITHUB_TOKEN: ${{ github.token }}
56+
57+
58+

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# kernelci-storage ChangeLog
2+
3+
## 0.1.0 (2025-01-06)
4+
5+
- Initial release

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ hex = "0.4.3"
1919
hmac = "0.12.1"
2020
http-body-util = "0.1.2"
2121
jwt = "0.16.0"
22+
openssl = { version = "0.10.68", features = ["vendored"] }
2223
rand = "0.8.5"
2324
reqwest = { version = "0.12.9", features = ["blocking"] }
2425
rustls = "0.23.20"

0 commit comments

Comments
 (0)