-
Notifications
You must be signed in to change notification settings - Fork 175
47 lines (40 loc) · 1.46 KB
/
build-rust-injector.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
name: Zarf Injector Rust Binaries
permissions:
contents: read
id-token: write
on:
workflow_dispatch:
inputs:
versionTag:
description: "Version tag"
required: true
jobs:
build-injector:
runs-on: ubuntu-latest
steps:
- name: "Checkout Repo"
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install tools
uses: ./.github/actions/install-tools
- name: "Build Rust Binary for x86_64 and arm64"
run: |
cd src/injector
make install-cross
make injector-linux
cd target
mkdir -p ../dist
cp x86_64-unknown-linux-musl/release/zarf-injector ../dist/zarf-injector-amd64
cp aarch64-unknown-linux-musl/release/zarf-injector ../dist/zarf-injector-arm64
cd ../dist
shasum zarf-injector-amd64 >> checksums.txt
shasum zarf-injector-arm64 >> checksums.txt
- name: Auth with AWS
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
with:
role-to-assume: ${{ secrets.AWS_WRITE_ROLE }}
role-session-name: ${{ github.job || github.event.client_payload.pull_request.head.sha || github.sha }}
aws-region: us-east-2
role-duration-seconds: 3600
- name: Sync Artifacts to S3
run: |
aws s3 sync src/injector/dist/ s3://zarf-init/injector/${{ github.event.inputs.versionTag }}/