Skip to content

Commit 9680913

Browse files
committed
added automated releases for linux
1 parent 522eb1c commit 9680913

2 files changed

Lines changed: 91 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
env:
12+
CARGO_TERM_COLOR: always
13+
14+
jobs:
15+
build:
16+
strategy:
17+
matrix:
18+
include:
19+
- target: x86_64-unknown-linux-gnu
20+
runner: ubuntu-latest
21+
artifact: concryptor-linux-x86_64
22+
- target: aarch64-unknown-linux-gnu
23+
runner: ubuntu-latest
24+
artifact: concryptor-linux-aarch64
25+
26+
runs-on: ${{ matrix.runner }}
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- name: Install Rust toolchain
32+
uses: dtolnay/rust-toolchain@stable
33+
with:
34+
targets: ${{ matrix.target }}
35+
36+
- name: Install cross-compilation tools (aarch64)
37+
if: matrix.target == 'aarch64-unknown-linux-gnu'
38+
run: |
39+
sudo apt-get update
40+
sudo apt-get install -y gcc-aarch64-linux-gnu
41+
42+
- name: Build release binary
43+
env:
44+
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
45+
run: cargo build --release --target ${{ matrix.target }}
46+
47+
- name: Package artifact
48+
run: |
49+
mkdir -p dist
50+
cp target/${{ matrix.target }}/release/concryptor dist/${{ matrix.artifact }}
51+
cd dist
52+
sha256sum ${{ matrix.artifact }} > ${{ matrix.artifact }}.sha256
53+
tar czf ${{ matrix.artifact }}.tar.gz ${{ matrix.artifact }} ${{ matrix.artifact }}.sha256
54+
55+
- name: Upload artifact
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: ${{ matrix.artifact }}
59+
path: dist/${{ matrix.artifact }}.tar.gz
60+
61+
release:
62+
needs: build
63+
runs-on: ubuntu-latest
64+
65+
steps:
66+
- uses: actions/checkout@v4
67+
68+
- name: Download all artifacts
69+
uses: actions/download-artifact@v4
70+
with:
71+
path: artifacts
72+
73+
- name: Collect release files
74+
run: |
75+
mkdir -p release
76+
find artifacts -name '*.tar.gz' -exec cp {} release/ \;
77+
# Extract individual files for direct download
78+
cd release
79+
for f in *.tar.gz; do tar xzf "$f"; done
80+
81+
- name: Create GitHub Release
82+
uses: softprops/action-gh-release@v2
83+
with:
84+
generate_release_notes: true
85+
files: |
86+
release/concryptor-linux-x86_64
87+
release/concryptor-linux-x86_64.sha256
88+
release/concryptor-linux-x86_64.tar.gz
89+
release/concryptor-linux-aarch64
90+
release/concryptor-linux-aarch64.sha256
91+
release/concryptor-linux-aarch64.tar.gz

TODO

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
Investigate why did the performance dropped by half on large files.

0 commit comments

Comments
 (0)