forked from OpenCentauri/OpenCentauri
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (63 loc) · 1.91 KB
/
decrypt-update.yml
File metadata and controls
73 lines (63 loc) · 1.91 KB
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
66
67
68
69
70
71
72
73
name: build-decrypt-update
on:
workflow_dispatch:
workflow_call:
secrets:
DECRYPTION_KEY:
required: true
DECRYPTION_IV:
required: true
push:
branches:
- main
paths:
- "decrypt-update/**"
jobs:
release:
name: Release - ${{ matrix.platform.os-name }}
environment: ci
strategy:
matrix:
platform:
- os-name: linux-armv7
runs-on: ubuntu-24.04
target: armv7-unknown-linux-musleabihf
runs-on: ${{ matrix.platform.runs-on }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set secrets
run: |
cd decrypt-update/
sed -i "s/DECRYPTION_KEY_PLACEHOLDER/${DECRYPTION_KEY}/g" src/key.rs
sed -i "s/DECRYPTION_IV_PLACEHOLDER/${DECRYPTION_IV}/g" src/key.rs
env:
DECRYPTION_KEY: ${{ secrets.DECRYPTION_KEY }}
DECRYPTION_IV: ${{ secrets.DECRYPTION_IV }}
- name: Build container
run: |
cd decrypt-update/
docker build -t cross-armv7:latest -f armv7.dockerfile .
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ""
- name: Install cross
run: cargo install cross --git https://github.com/cross-rs/cross
- name: Build binary
run: |
cd decrypt-update/
cross build --target ${{ matrix.platform.target }} --locked --release
- name: Package
env:
PROJECT: decrypt-update
PLATFORM: ${{ matrix.platform.os-name }}
TARGET: ${{ matrix.platform.target }}
run: |
mkdir package
mv "$PROJECT/target/$TARGET/release/$PROJECT" "package/$PROJECT-$PLATFORM"
- name: Upload binary
uses: actions/upload-artifact@v6
with:
name: decrypt-update-${{ matrix.platform.os-name }}
path: package/*