-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (47 loc) · 1.45 KB
/
debian-ci.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
name: debian-ci
on:
push:
branches: [ main ]
tags:
- '*'
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.ref }}-deb
cancel-in-progress: true
jobs:
ci:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: dsherret/rust-toolchain-file@v1
- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
cache-all-crates: true
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install cargo-deb
run: cargo install cargo-deb
- name: Setup deb-s3
uses: alw3ys/setup-deb-s3@v1
- name: Cargo deb
run: |
CARGO_DEB_OUTPUT=$(cargo deb --package doseid)
DEB_PACKAGE_NAME=$(echo "$CARGO_DEB_OUTPUT" | grep -o '[^/]*\.deb$')
echo "DEB_PACKAGE_NAME=$DEB_PACKAGE_NAME" >> $GITHUB_ENV
- name: Configure AWS Credentials
if: startsWith(github.ref, 'refs/tags/')
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: AKIASZDFCITSGESB2DSD
aws-region: eu-west-1
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Publish to S3
if: startsWith(github.ref, 'refs/tags/')
working-directory: target/debian
run: deb-s3 upload --bucket packages.dosei.io $DEB_PACKAGE_NAME