Skip to content

Commit

Permalink
feat: build doseid.deb and publish to registry
Browse files Browse the repository at this point in the history
  • Loading branch information
Alw3ys authored Mar 12, 2024
1 parent 94dd8ee commit cf01acd
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/dctl-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ jobs:

- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
cache-all-crates: true

- name: Install Protoc
uses: arduino/setup-protoc@v2
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/debian-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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@v2
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
2 changes: 2 additions & 0 deletions .github/workflows/docker-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:

- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
cache-all-crates: true

- name: Install Protoc
uses: arduino/setup-protoc@v2
Expand Down
2 changes: 2 additions & 0 deletions doseid/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
name = "doseid"
description = "Dosei Daemon"
version = { workspace = true }
license = { workspace = true }
authors = { workspace = true }
edition = { workspace = true }

[dependencies]
Expand Down

0 comments on commit cf01acd

Please sign in to comment.